[POWERPC] powermac: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powermac platform & macintosh driver changes. Built for pmac32_defconfig, g5_defconfig Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
eeb2b723ef
commit
018a3d1db7
@@ -233,15 +233,15 @@ static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev)
|
||||
{
|
||||
struct wf_sat *sat;
|
||||
struct wf_sat_sensor *sens;
|
||||
u32 *reg;
|
||||
char *loc, *type;
|
||||
const u32 *reg;
|
||||
const char *loc, *type;
|
||||
u8 addr, chip, core;
|
||||
struct device_node *child;
|
||||
int shift, cpu, index;
|
||||
char *name;
|
||||
int vsens[2], isens[2];
|
||||
|
||||
reg = (u32 *) get_property(dev, "reg", NULL);
|
||||
reg = get_property(dev, "reg", NULL);
|
||||
if (reg == NULL)
|
||||
return;
|
||||
addr = *reg;
|
||||
@@ -268,7 +268,7 @@ static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev)
|
||||
isens[0] = isens[1] = -1;
|
||||
child = NULL;
|
||||
while ((child = of_get_next_child(dev, child)) != NULL) {
|
||||
reg = (u32 *) get_property(child, "reg", NULL);
|
||||
reg = get_property(child, "reg", NULL);
|
||||
type = get_property(child, "device_type", NULL);
|
||||
loc = get_property(child, "location", NULL);
|
||||
if (reg == NULL || loc == NULL)
|
||||
|
Reference in New Issue
Block a user