[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>
This commit is contained in:
Stephen Rothwell
2007-04-24 13:53:04 +10:00
committed by Paul Mackerras
parent 1658ab6678
commit 30686ba6d5
19 changed files with 207 additions and 135 deletions
+10 -6
View File
@@ -179,12 +179,14 @@ MODULE_LICENSE("GPL");
int init_module(void)
{
struct device_node *dp;
int ret = -ENXIO;
dp = find_devices("control");
dp = of_find_node_by_name(NULL, "control");
if (dp != 0 && !control_of_init(dp))
return 0;
ret = 0;
of_node_put(dp);
return -ENXIO;
return ret;
}
void cleanup_module(void)
@@ -589,16 +591,18 @@ static int __init control_init(void)
{
struct device_node *dp;
char *option = NULL;
int ret = -ENXIO;
if (fb_get_options("controlfb", &option))
return -ENODEV;
control_setup(option);
dp = find_devices("control");
dp = of_find_node_by_name(NULL, "control");
if (dp != 0 && !control_of_init(dp))
return 0;
ret = 0;
of_node_put(dp);
return -ENXIO;
return ret;
}
module_init(control_init);