]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/cris/arch-v10/drivers/sync_serial.c
cris: Pushdown the bkl from ioctl
[net-next-2.6.git] / arch / cris / arch-v10 / drivers / sync_serial.c
index 109dcd826d171cac5d3fcf31228ab7230f057f1a..ee2dd4323daf4ee0c901045748714057c738e64f 100644 (file)
@@ -157,7 +157,7 @@ static int sync_serial_open(struct inode *inode, struct file *file);
 static int sync_serial_release(struct inode *inode, struct file *file);
 static unsigned int sync_serial_poll(struct file *filp, poll_table *wait);
 
-static int sync_serial_ioctl(struct inode *inode, struct file *file,
+static int sync_serial_ioctl(struct file *file,
        unsigned int cmd, unsigned long arg);
 static ssize_t sync_serial_write(struct file *file, const char *buf,
        size_t count, loff_t *ppos);
@@ -244,13 +244,13 @@ static unsigned sync_serial_prescale_shadow;
 #define NUMBER_OF_PORTS 2
 
 static const struct file_operations sync_serial_fops = {
-       .owner   = THIS_MODULE,
-       .write   = sync_serial_write,
-       .read    = sync_serial_read,
-       .poll    = sync_serial_poll,
-       .ioctl   = sync_serial_ioctl,
-       .open    = sync_serial_open,
-       .release = sync_serial_release
+       .owner          = THIS_MODULE,
+       .write          = sync_serial_write,
+       .read           = sync_serial_read,
+       .poll           = sync_serial_poll,
+       .unlocked_ioctl = sync_serial_ioctl,
+       .open           = sync_serial_open,
+       .release        = sync_serial_release
 };
 
 static int __init etrax_sync_serial_init(void)
@@ -678,7 +678,7 @@ static unsigned int sync_serial_poll(struct file *file, poll_table *wait)
        return mask;
 }
 
-static int sync_serial_ioctl(struct inode *inode, struct file *file,
+static int sync_serial_ioctl_unlocked(struct file *file,
                  unsigned int cmd, unsigned long arg)
 {
        int return_val = 0;
@@ -956,6 +956,18 @@ static int sync_serial_ioctl(struct inode *inode, struct file *file,
        return return_val;
 }
 
+static long sync_serial_ioctl(struct file *file,
+                             unsigned int cmd, unsigned long arg)
+{
+       long ret;
+
+       lock_kernel();
+       ret = sync_serial_ioctl_unlocked(file, cmd, arg);
+       unlock_kernel();
+
+       return ret;
+}
+
 
 static ssize_t sync_serial_write(struct file *file, const char *buf,
        size_t count, loff_t *ppos)