]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/powermac/backlight.c
Merge branch 'next'
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / powermac / backlight.c
index de7440e62cc4fb05f0bc7b58e0d5b0ad3e81ff95..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 = get_property(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;