aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/via-pmu.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-07-12 01:40:29 -0400
committerPaul Mackerras <paulus@samba.org>2006-07-31 01:55:05 -0400
commit018a3d1db7cdb6127656c1622ee1d2302e16436d (patch)
tree5b6714fa9fcd1441f7c1b30e0391484c095925b6 /drivers/macintosh/via-pmu.c
parenteeb2b723ef5100fafa381d92eb70d83e98516a44 (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/via-pmu.c')
-rw-r--r--drivers/macintosh/via-pmu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 06ca80bfd6b9..80e88b4a1d07 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -287,7 +287,7 @@ static char *pbook_type[] = {
287int __init find_via_pmu(void) 287int __init find_via_pmu(void)
288{ 288{
289 u64 taddr; 289 u64 taddr;
290 u32 *reg; 290 const u32 *reg;
291 291
292 if (via != 0) 292 if (via != 0)
293 return 1; 293 return 1;
@@ -295,7 +295,7 @@ int __init find_via_pmu(void)
295 if (vias == NULL) 295 if (vias == NULL)
296 return 0; 296 return 0;
297 297
298 reg = (u32 *)get_property(vias, "reg", NULL); 298 reg = get_property(vias, "reg", NULL);
299 if (reg == NULL) { 299 if (reg == NULL) {
300 printk(KERN_ERR "via-pmu: No \"reg\" property !\n"); 300 printk(KERN_ERR "via-pmu: No \"reg\" property !\n");
301 goto fail; 301 goto fail;
@@ -337,7 +337,7 @@ int __init find_via_pmu(void)
337 337
338 gpiop = of_find_node_by_name(NULL, "gpio"); 338 gpiop = of_find_node_by_name(NULL, "gpio");
339 if (gpiop) { 339 if (gpiop) {
340 reg = (u32 *)get_property(gpiop, "reg", NULL); 340 reg = get_property(gpiop, "reg", NULL);
341 if (reg) 341 if (reg)
342 gaddr = of_translate_address(gpiop, reg); 342 gaddr = of_translate_address(gpiop, reg);
343 if (gaddr != OF_BAD_ADDR) 343 if (gaddr != OF_BAD_ADDR)
@@ -486,9 +486,9 @@ static int __init via_pmu_dev_init(void)
486 pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART; 486 pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART;
487 } else { 487 } else {
488 struct device_node* prim = find_devices("power-mgt"); 488 struct device_node* prim = find_devices("power-mgt");
489 u32 *prim_info = NULL; 489 const u32 *prim_info = NULL;
490 if (prim) 490 if (prim)
491 prim_info = (u32 *)get_property(prim, "prim-info", NULL); 491 prim_info = get_property(prim, "prim-info", NULL);
492 if (prim_info) { 492 if (prim_info) {
493 /* Other stuffs here yet unknown */ 493 /* Other stuffs here yet unknown */
494 pmu_battery_count = (prim_info[6] >> 16) & 0xff; 494 pmu_battery_count = (prim_info[6] >> 16) & 0xff;