]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/macintosh/ans-lcd.c
USB: ftdi_sio: fix oops due to processing workarounds too early
[linux-2.6-omap-h63xx.git] / drivers / macintosh / ans-lcd.c
index 5e0811dc6536aabcc63c4e236f22900dd1691e94..e54c4d9f63650387649f55934b920741a1f07ccc 100644 (file)
@@ -27,7 +27,7 @@ static volatile unsigned char __iomem *anslcd_ptr;
 
 #undef DEBUG
 
-static void __pmac
+static void
 anslcd_write_byte_ctrl ( unsigned char c )
 {
 #ifdef DEBUG
@@ -43,14 +43,14 @@ anslcd_write_byte_ctrl ( unsigned char c )
        }
 }
 
-static void __pmac
+static void
 anslcd_write_byte_data ( unsigned char c )
 {
        out_8(anslcd_ptr + ANSLCD_DATA_IX, c);
        udelay(anslcd_short_delay);
 }
 
-static ssize_t __pmac
+static ssize_t
 anslcd_write( struct file * file, const char __user * buf, 
                                size_t count, loff_t *ppos )
 {
@@ -73,7 +73,7 @@ anslcd_write( struct file * file, const char __user * buf,
        return p - buf;
 }
 
-static int __pmac
+static int
 anslcd_ioctl( struct inode * inode, struct file * file,
                                unsigned int cmd, unsigned long arg )
 {
@@ -115,13 +115,13 @@ anslcd_ioctl( struct inode * inode, struct file * file,
        }
 }
 
-static int __pmac
+static int
 anslcd_open( struct inode * inode, struct file * file )
 {
        return 0;
 }
 
-struct file_operations anslcd_fops = {
+const struct file_operations anslcd_fops = {
        .write  = anslcd_write,
        .ioctl  = anslcd_ioctl,
        .open   = anslcd_open,
@@ -145,11 +145,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);