aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/via-pmu.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2005-12-13 02:01:21 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:53:55 -0500
commitcc5d0189b9ba95260857a5018a1c2fef90008507 (patch)
tree1202c94b6b3cb81a96d0a0e54424cad10eef68bb /drivers/macintosh/via-pmu.c
parent9cf84d7c97992dbe5360b241327341c07ce30fc9 (diff)
[PATCH] powerpc: Remove device_node addrs/n_addr
The pre-parsed addrs/n_addrs fields in struct device_node are finally gone. Remove the dodgy heuristics that did that parsing at boot and remove the fields themselves since we now have a good replacement with the new OF parsing code. This patch also fixes a bunch of drivers to use the new code instead, so that at least pmac32, pseries, iseries and g5 defconfigs build. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/via-pmu.c')
-rw-r--r--drivers/macintosh/via-pmu.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index d6dabee55f2f..79c7b44a94ee 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -298,7 +298,7 @@ static struct backlight_controller pmu_backlight_controller = {
298 298
299int __init find_via_pmu(void) 299int __init find_via_pmu(void)
300{ 300{
301 phys_addr_t taddr; 301 u64 taddr;
302 u32 *reg; 302 u32 *reg;
303 303
304 if (via != 0) 304 if (via != 0)
@@ -337,7 +337,7 @@ int __init find_via_pmu(void)
337 else if (device_is_compatible(vias->parent, "Keylargo") 337 else if (device_is_compatible(vias->parent, "Keylargo")
338 || device_is_compatible(vias->parent, "K2-Keylargo")) { 338 || device_is_compatible(vias->parent, "K2-Keylargo")) {
339 struct device_node *gpiop; 339 struct device_node *gpiop;
340 phys_addr_t gaddr = 0; 340 u64 gaddr = OF_BAD_ADDR;
341 341
342 pmu_kind = PMU_KEYLARGO_BASED; 342 pmu_kind = PMU_KEYLARGO_BASED;
343 pmu_has_adb = (find_type_devices("adb") != NULL); 343 pmu_has_adb = (find_type_devices("adb") != NULL);
@@ -352,7 +352,7 @@ int __init find_via_pmu(void)
352 reg = (u32 *)get_property(gpiop, "reg", NULL); 352 reg = (u32 *)get_property(gpiop, "reg", NULL);
353 if (reg) 353 if (reg)
354 gaddr = of_translate_address(gpiop, reg); 354 gaddr = of_translate_address(gpiop, reg);
355 if (gaddr != 0) 355 if (gaddr != OF_BAD_ADDR)
356 gpio_reg = ioremap(gaddr, 0x10); 356 gpio_reg = ioremap(gaddr, 0x10);
357 } 357 }
358 if (gpio_reg == NULL) 358 if (gpio_reg == NULL)
@@ -479,9 +479,6 @@ static int __init via_pmu_dev_init(void)
479 if (vias == NULL) 479 if (vias == NULL)
480 return -ENODEV; 480 return -ENODEV;
481 481
482#ifndef CONFIG_PPC64
483 request_OF_resource(vias, 0, NULL);
484#endif
485#ifdef CONFIG_PMAC_BACKLIGHT 482#ifdef CONFIG_PMAC_BACKLIGHT
486 /* Enable backlight */ 483 /* Enable backlight */
487 register_backlight_controller(&pmu_backlight_controller, NULL, "pmu"); 484 register_backlight_controller(&pmu_backlight_controller, NULL, "pmu");