summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/chrp/setup.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-24 13:53:04 +1000
committerPaul Mackerras <paulus@samba.org>2007-04-24 22:09:02 +1000
commit30686ba6d56858657829d3eb524ed73e5dc98d2b (patch)
tree42bf3cea4dc7028fec30377560b367cd8274825e /arch/powerpc/platforms/chrp/setup.c
parent1658ab66781d918f604c6069c5cf9a94b6f52f84 (diff)
downloadlinux-30686ba6d56858657829d3eb524ed73e5dc98d2b.tar.gz
linux-30686ba6d56858657829d3eb524ed73e5dc98d2b.tar.bz2
linux-30686ba6d56858657829d3eb524ed73e5dc98d2b.zip
[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 'arch/powerpc/platforms/chrp/setup.c')
-rw-r--r--arch/powerpc/platforms/chrp/setup.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 9c1b231b1ff9..1870038a8e0a 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -468,7 +468,7 @@ static void __init chrp_find_8259(void)
* Also, Pegasos-type platforms don't have a proper node to start
* from anyway
*/
- for (np = find_devices("pci"); np != NULL; np = np->next) {
+ for_each_node_by_name(np, "pci") {
const unsigned int *addrp = of_get_property(np,
"8259-interrupt-acknowledge", NULL);
@@ -477,6 +477,7 @@ static void __init chrp_find_8259(void)
chrp_int_ack = addrp[of_n_addr_cells(np)-1];
break;
}
+ of_node_put(np);
if (np == NULL)
printk(KERN_WARNING "Cannot find PCI interrupt acknowledge"
" address, polling\n");
@@ -518,10 +519,11 @@ void __init chrp_init_IRQ(void)
#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON)
/* see if there is a keyboard in the device tree
with a parent of type "adb" */
- for (kbd = find_devices("keyboard"); kbd; kbd = kbd->next)
+ for_each_node_by_name(kbd, "keyboard")
if (kbd->parent && kbd->parent->type
&& strcmp(kbd->parent->type, "adb") == 0)
break;
+ of_node_put(kbd);
if (kbd)
setup_irq(HYDRA_INT_ADB_NMI, &xmon_irqaction);
#endif
@@ -547,7 +549,7 @@ chrp_init2(void)
/* Get the event scan rate for the rtas so we know how
* often it expects a heartbeat. -- Cort
*/
- device = find_devices("rtas");
+ device = of_find_node_by_name(NULL, "rtas");
if (device)
p = of_get_property(device, "rtas-event-scan-rate", NULL);
if (p && *p) {
@@ -576,6 +578,7 @@ chrp_init2(void)
printk("RTAS Event Scan Rate: %u (%lu jiffies)\n",
*p, interval);
}
+ of_node_put(device);
if (ppc_md.progress)
ppc_md.progress(" Have fun! ", 0x7777);