aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/controlfb.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/video/controlfb.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/video/controlfb.c')
-rw-r--r--drivers/video/controlfb.c16
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");
179int init_module(void) 179int init_module(void)
180{ 180{
181 struct device_node *dp; 181 struct device_node *dp;
182 int ret = -ENXIO;
182 183
183 dp = find_devices("control"); 184 dp = of_find_node_by_name(NULL, "control");
184 if (dp != 0 && !control_of_init(dp)) 185 if (dp != 0 && !control_of_init(dp))
185 return 0; 186 ret = 0;
187 of_node_put(dp);
186 188
187 return -ENXIO; 189 return ret;
188} 190}
189 191
190void cleanup_module(void) 192void cleanup_module(void)
@@ -589,16 +591,18 @@ static int __init control_init(void)
589{ 591{
590 struct device_node *dp; 592 struct device_node *dp;
591 char *option = NULL; 593 char *option = NULL;
594 int ret = -ENXIO;
592 595
593 if (fb_get_options("controlfb", &option)) 596 if (fb_get_options("controlfb", &option))
594 return -ENODEV; 597 return -ENODEV;
595 control_setup(option); 598 control_setup(option);
596 599
597 dp = find_devices("control"); 600 dp = of_find_node_by_name(NULL, "control");
598 if (dp != 0 && !control_of_init(dp)) 601 if (dp != 0 && !control_of_init(dp))
599 return 0; 602 ret = 0;
603 of_node_put(dp);
600 604
601 return -ENXIO; 605 return ret;
602} 606}
603 607
604module_init(control_init); 608module_init(control_init);