diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-04-24 13:53:04 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-24 22:09:02 +1000 |
commit | 30686ba6d56858657829d3eb524ed73e5dc98d2b (patch) | |
tree | 42bf3cea4dc7028fec30377560b367cd8274825e /drivers/video/controlfb.c | |
parent | 1658ab66781d918f604c6069c5cf9a94b6f52f84 (diff) | |
download | blackbird-op-linux-30686ba6d56858657829d3eb524ed73e5dc98d2b.tar.gz blackbird-op-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 'drivers/video/controlfb.c')
-rw-r--r-- | drivers/video/controlfb.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c index fd60dba294da..8b762739b1e0 100644 --- a/drivers/video/controlfb.c +++ b/drivers/video/controlfb.c @@ -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); |