aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/ans-lcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh/ans-lcd.c')
-rw-r--r--drivers/macintosh/ans-lcd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c
index cdd5a0f72e3c..e54c4d9f6365 100644
--- a/drivers/macintosh/ans-lcd.c
+++ b/drivers/macintosh/ans-lcd.c
@@ -145,11 +145,12 @@ anslcd_init(void)
145 int retval; 145 int retval;
146 struct device_node* node; 146 struct device_node* node;
147 147
148 node = find_devices("lcd"); 148 node = of_find_node_by_name(NULL, "lcd");
149 if (!node || !node->parent) 149 if (!node || !node->parent || strcmp(node->parent->name, "gc")) {
150 return -ENODEV; 150 of_node_put(node);
151 if (strcmp(node->parent->name, "gc"))
152 return -ENODEV; 151 return -ENODEV;
152 }
153 of_node_put(node);
153 154
154 anslcd_ptr = ioremap(ANSLCD_ADDR, 0x20); 155 anslcd_ptr = ioremap(ANSLCD_ADDR, 0x20);
155 156