aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/via-pmu.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-23 23:53:04 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-24 08:09:02 -0400
commit30686ba6d56858657829d3eb524ed73e5dc98d2b (patch)
tree42bf3cea4dc7028fec30377560b367cd8274825e /drivers/macintosh/via-pmu.c
parent1658ab66781d918f604c6069c5cf9a94b6f52f84 (diff)
[POWERPC] Remove old interface find_devices
Replace uses with of_find_node_by_name and for_each_node_by_name. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/via-pmu.c')
-rw-r--r--drivers/macintosh/via-pmu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 7b7db5db50dc..e31cb1e7a47b 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -487,7 +487,8 @@ static int __init via_pmu_dev_init(void)
487 pmu_batteries[0].flags |= PMU_BATT_TYPE_SMART; 487 pmu_batteries[0].flags |= PMU_BATT_TYPE_SMART;
488 pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART; 488 pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART;
489 } else { 489 } else {
490 struct device_node* prim = find_devices("power-mgt"); 490 struct device_node* prim =
491 of_find_node_by_name(NULL, "power-mgt");
491 const u32 *prim_info = NULL; 492 const u32 *prim_info = NULL;
492 if (prim) 493 if (prim)
493 prim_info = of_get_property(prim, "prim-info", NULL); 494 prim_info = of_get_property(prim, "prim-info", NULL);
@@ -498,6 +499,7 @@ static int __init via_pmu_dev_init(void)
498 if (pmu_battery_count > 1) 499 if (pmu_battery_count > 1)
499 pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART; 500 pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART;
500 } 501 }
502 of_node_put(prim);
501 } 503 }
502#endif /* CONFIG_PPC32 */ 504#endif /* CONFIG_PPC32 */
503 505