aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
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 /arch/powerpc/kernel
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 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/prom.c19
-rw-r--r--arch/powerpc/kernel/vio.c3
2 files changed, 2 insertions, 20 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 860c88b2f6d1..caef555f2dc0 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1072,25 +1072,6 @@ int of_n_size_cells(struct device_node* np)
1072} 1072}
1073EXPORT_SYMBOL(of_n_size_cells); 1073EXPORT_SYMBOL(of_n_size_cells);
1074 1074
1075/**
1076 * Construct and return a list of the device_nodes with a given name.
1077 */
1078struct device_node *find_devices(const char *name)
1079{
1080 struct device_node *head, **prevp, *np;
1081
1082 prevp = &head;
1083 for (np = allnodes; np != 0; np = np->allnext) {
1084 if (np->name != 0 && strcasecmp(np->name, name) == 0) {
1085 *prevp = np;
1086 prevp = &np->next;
1087 }
1088 }
1089 *prevp = NULL;
1090 return head;
1091}
1092EXPORT_SYMBOL(find_devices);
1093
1094/** Checks if the given "compat" string matches one of the strings in 1075/** Checks if the given "compat" string matches one of the strings in
1095 * the device's "compatible" property 1076 * the device's "compatible" property
1096 */ 1077 */
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index a09277a8639f..9eaefac5053f 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -308,7 +308,7 @@ static int __init vio_bus_init(void)
308 return err; 308 return err;
309 } 309 }
310 310
311 node_vroot = find_devices("vdevice"); 311 node_vroot = of_find_node_by_name(NULL, "vdevice");
312 if (node_vroot) { 312 if (node_vroot) {
313 struct device_node *of_node; 313 struct device_node *of_node;
314 314
@@ -322,6 +322,7 @@ static int __init vio_bus_init(void)
322 __FUNCTION__, of_node); 322 __FUNCTION__, of_node);
323 vio_register_device_node(of_node); 323 vio_register_device_node(of_node);
324 } 324 }
325 of_node_put(node_vroot);
325 } 326 }
326 327
327 return 0; 328 return 0;