]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/briq_panel.c
sg: fix odd style (extra parenthesis) introduced by cmd filter patch
[linux-2.6-omap-h63xx.git] / drivers / char / briq_panel.c
index 8dcf9d20f44985be7cbf707bee14e5e20af6a077..b6f2639f903d344754f211f12e7e630759e2861a 100644 (file)
@@ -91,11 +91,6 @@ static ssize_t briq_panel_read(struct file *file, char __user *buf, size_t count
        unsigned short c;
        unsigned char cp;
 
-#if 0  /*  Can't seek (pread) on this device  */
-       if (ppos != &file->f_pos)
-               return -ESPIPE;
-#endif
-
        if (!vfd_is_open)
                return -ENODEV;
 
@@ -139,11 +134,6 @@ static ssize_t briq_panel_write(struct file *file, const char __user *buf, size_
        size_t indx = len;
        int i, esc = 0;
 
-#if 0  /*  Can't seek (pwrite) on this device  */
-       if (ppos != &file->f_pos)
-               return -ESPIPE;
-#endif
-
        if (!vfd_is_open)
                return -EBUSY;
 
@@ -202,13 +192,16 @@ static struct miscdevice briq_panel_miscdev = {
 
 static int __init briq_panel_init(void)
 {
-       struct device_node *root = find_path_device("/");
+       struct device_node *root = of_find_node_by_path("/");
        const char *machine;
        int i;
 
-       machine = get_property(root, "model", NULL);
-       if (!machine || strncmp(machine, "TotalImpact,BRIQ-1", 18) != 0)
+       machine = of_get_property(root, "model", NULL);
+       if (!machine || strncmp(machine, "TotalImpact,BRIQ-1", 18) != 0) {
+               of_node_put(root);
                return -ENODEV;
+       }
+       of_node_put(root);
 
        printk(KERN_INFO
                "briq_panel: v%s Dr. Karsten Jeppesen (kj@totalimpact.com)\n",