aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powermac/backlight.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/powermac/backlight.c')
-rw-r--r--arch/powerpc/platforms/powermac/backlight.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c
index de7440e62cc4..d679964ae2ab 100644
--- a/arch/powerpc/platforms/powermac/backlight.c
+++ b/arch/powerpc/platforms/powermac/backlight.c
@@ -56,13 +56,16 @@ struct backlight_device *pmac_backlight;
56 56
57int pmac_has_backlight_type(const char *type) 57int pmac_has_backlight_type(const char *type)
58{ 58{
59 struct device_node* bk_node = find_devices("backlight"); 59 struct device_node* bk_node = of_find_node_by_name(NULL, "backlight");
60 60
61 if (bk_node) { 61 if (bk_node) {
62 const char *prop = get_property(bk_node, 62 const char *prop = of_get_property(bk_node,
63 "backlight-control", NULL); 63 "backlight-control", NULL);
64 if (prop && strncmp(prop, type, strlen(type)) == 0) 64 if (prop && strncmp(prop, type, strlen(type)) == 0) {
65 of_node_put(bk_node);
65 return 1; 66 return 1;
67 }
68 of_node_put(bk_node);
66 } 69 }
67 70
68 return 0; 71 return 0;