]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/video/controlfb.c
[POWERPC] Remove old interface find_devices
[karo-tx-linux.git] / drivers / video / controlfb.c
index fd60dba294dabf28882b3d2084fd1bc23ecf8828..8b762739b1e02720ff36bc2010165760a4c252ed 100644 (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);