]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/platforms/powermac/backlight.c
[POWERPC] Remove old interface find_devices
[karo-tx-linux.git] / arch / powerpc / platforms / powermac / backlight.c
index 0dc8a45c408abd48e7a892ea19ba2ce235f5fcea..d679964ae2ab28321589c9194de481a7ba0d2bea 100644 (file)
@@ -56,13 +56,16 @@ struct backlight_device *pmac_backlight;
 
 int pmac_has_backlight_type(const char *type)
 {
-       struct device_node* bk_node = find_devices("backlight");
+       struct device_node* bk_node = of_find_node_by_name(NULL, "backlight");
 
        if (bk_node) {
                const char *prop = of_get_property(bk_node,
                                "backlight-control", NULL);
-               if (prop && strncmp(prop, type, strlen(type)) == 0)
+               if (prop && strncmp(prop, type, strlen(type)) == 0) {
+                       of_node_put(bk_node);
                        return 1;
+               }
+               of_node_put(bk_node);
        }
 
        return 0;