]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/ppdev.c
uli526x: Add suspend and resume routines (updated)
[linux-2.6-omap-h63xx.git] / drivers / char / ppdev.c
index c1e3dd837fc84fdef05d7eb987935fdfe79b4d78..84ac64fc48a1a72f4d3aebbf5fffac70e2200ae1 100644 (file)
@@ -66,7 +66,6 @@
 #include <linux/poll.h>
 #include <linux/major.h>
 #include <linux/ppdev.h>
-#include <linux/smp_lock.h>
 #include <linux/device.h>
 #include <asm/uaccess.h>
 
@@ -106,7 +105,7 @@ static inline void pp_enable_irq (struct pp_struct *pp)
 static ssize_t pp_read (struct file * file, char __user * buf, size_t count,
                        loff_t * ppos)
 {
-       unsigned int minor = iminor(file->f_dentry->d_inode);
+       unsigned int minor = iminor(file->f_path.dentry->d_inode);
        struct pp_struct *pp = file->private_data;
        char * kbuffer;
        ssize_t bytes_read = 0;
@@ -189,7 +188,7 @@ static ssize_t pp_read (struct file * file, char __user * buf, size_t count,
 static ssize_t pp_write (struct file * file, const char __user * buf,
                         size_t count, loff_t * ppos)
 {
-       unsigned int minor = iminor(file->f_dentry->d_inode);
+       unsigned int minor = iminor(file->f_path.dentry->d_inode);
        struct pp_struct *pp = file->private_data;
        char * kbuffer;
        ssize_t bytes_written = 0;
@@ -752,7 +751,7 @@ static const struct file_operations pp_fops = {
 
 static void pp_attach(struct parport *port)
 {
-       device_create(ppdev_class, NULL, MKDEV(PP_MAJOR, port->number),
+       device_create(ppdev_class, port->dev, MKDEV(PP_MAJOR, port->number),
                        "parport%d", port->number);
 }