diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-07-12 01:40:29 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 01:55:05 -0400 |
commit | 018a3d1db7cdb6127656c1622ee1d2302e16436d (patch) | |
tree | 5b6714fa9fcd1441f7c1b30e0391484c095925b6 /drivers/macintosh/therm_pm72.c | |
parent | eeb2b723ef5100fafa381d92eb70d83e98516a44 (diff) |
[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>
Diffstat (limited to 'drivers/macintosh/therm_pm72.c')
-rw-r--r-- | drivers/macintosh/therm_pm72.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 20bf67244e2c..d00c0c37a12e 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -660,7 +660,7 @@ static int read_eeprom(int cpu, struct mpu_data *out) | |||
660 | { | 660 | { |
661 | struct device_node *np; | 661 | struct device_node *np; |
662 | char nodename[64]; | 662 | char nodename[64]; |
663 | u8 *data; | 663 | const u8 *data; |
664 | int len; | 664 | int len; |
665 | 665 | ||
666 | /* prom.c routine for finding a node by path is a bit brain dead | 666 | /* prom.c routine for finding a node by path is a bit brain dead |
@@ -673,7 +673,7 @@ static int read_eeprom(int cpu, struct mpu_data *out) | |||
673 | printk(KERN_ERR "therm_pm72: Failed to retrieve cpuid node from device-tree\n"); | 673 | printk(KERN_ERR "therm_pm72: Failed to retrieve cpuid node from device-tree\n"); |
674 | return -ENODEV; | 674 | return -ENODEV; |
675 | } | 675 | } |
676 | data = (u8 *)get_property(np, "cpuid", &len); | 676 | data = get_property(np, "cpuid", &len); |
677 | if (data == NULL) { | 677 | if (data == NULL) { |
678 | printk(KERN_ERR "therm_pm72: Failed to retrieve cpuid property from device-tree\n"); | 678 | printk(KERN_ERR "therm_pm72: Failed to retrieve cpuid property from device-tree\n"); |
679 | of_node_put(np); | 679 | of_node_put(np); |
@@ -1336,7 +1336,7 @@ static int init_backside_state(struct backside_pid_state *state) | |||
1336 | */ | 1336 | */ |
1337 | u3 = of_find_node_by_path("/u3@0,f8000000"); | 1337 | u3 = of_find_node_by_path("/u3@0,f8000000"); |
1338 | if (u3 != NULL) { | 1338 | if (u3 != NULL) { |
1339 | u32 *vers = (u32 *)get_property(u3, "device-rev", NULL); | 1339 | const u32 *vers = get_property(u3, "device-rev", NULL); |
1340 | if (vers) | 1340 | if (vers) |
1341 | if (((*vers) & 0x3f) < 0x34) | 1341 | if (((*vers) & 0x3f) < 0x34) |
1342 | u3h = 0; | 1342 | u3h = 0; |
@@ -2111,8 +2111,8 @@ static void fcu_lookup_fans(struct device_node *fcu_node) | |||
2111 | 2111 | ||
2112 | while ((np = of_get_next_child(fcu_node, np)) != NULL) { | 2112 | while ((np = of_get_next_child(fcu_node, np)) != NULL) { |
2113 | int type = -1; | 2113 | int type = -1; |
2114 | char *loc; | 2114 | const char *loc; |
2115 | u32 *reg; | 2115 | const u32 *reg; |
2116 | 2116 | ||
2117 | DBG(" control: %s, type: %s\n", np->name, np->type); | 2117 | DBG(" control: %s, type: %s\n", np->name, np->type); |
2118 | 2118 | ||
@@ -2128,8 +2128,8 @@ static void fcu_lookup_fans(struct device_node *fcu_node) | |||
2128 | continue; | 2128 | continue; |
2129 | 2129 | ||
2130 | /* Lookup for a matching location */ | 2130 | /* Lookup for a matching location */ |
2131 | loc = (char *)get_property(np, "location", NULL); | 2131 | loc = get_property(np, "location", NULL); |
2132 | reg = (u32 *)get_property(np, "reg", NULL); | 2132 | reg = get_property(np, "reg", NULL); |
2133 | if (loc == NULL || reg == NULL) | 2133 | if (loc == NULL || reg == NULL) |
2134 | continue; | 2134 | continue; |
2135 | DBG(" matching location: %s, reg: 0x%08x\n", loc, *reg); | 2135 | DBG(" matching location: %s, reg: 0x%08x\n", loc, *reg); |