Merge branch 'linux-2.6' into powerpc-next
[linux-2.6.git] / drivers / macintosh / ans-lcd.c
index cdd5a0f..73c50bc 100644 (file)
 #include <asm/uaccess.h>
 #include <asm/sections.h>
 #include <asm/prom.h>
-#include <asm/ans-lcd.h>
 #include <asm/io.h>
 
+#include "ans-lcd.h"
+
 #define ANSLCD_ADDR            0xf301c000
 #define ANSLCD_CTRL_IX 0x00
 #define ANSLCD_DATA_IX 0x10
@@ -145,11 +146,12 @@ anslcd_init(void)
        int retval;
        struct device_node* node;
 
-       node = find_devices("lcd");
-       if (!node || !node->parent)
-               return -ENODEV;
-       if (strcmp(node->parent->name, "gc"))
+       node = of_find_node_by_name(NULL, "lcd");
+       if (!node || !node->parent || strcmp(node->parent->name, "gc")) {
+               of_node_put(node);
                return -ENODEV;
+       }
+       of_node_put(node);
 
        anslcd_ptr = ioremap(ANSLCD_ADDR, 0x20);