diff options
Diffstat (limited to 'drivers/macintosh/via-pmu.c')
-rw-r--r-- | drivers/macintosh/via-pmu.c | 10 |
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[] = { | |||
287 | int __init find_via_pmu(void) | 287 | int __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; |