aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/controlfb.c
diff options
context:
space:
mode:
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);