diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-04-27 20:15:07 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 11:35:36 -0700 |
commit | b1f2ac07636aadee5cb077fc7e830908b00fcaae (patch) | |
tree | 852211194d15c11389037dce6c413270683c4f26 /drivers/staging/vme/devices | |
parent | 59200df52cf7d4bfb93aeb30289a8e9d2af3058d (diff) | |
download | op-kernel-dev-b1f2ac07636aadee5cb077fc7e830908b00fcaae.zip op-kernel-dev-b1f2ac07636aadee5cb077fc7e830908b00fcaae.tar.gz |
Staging: push down BKL into ioctl functions
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vme/devices')
-rw-r--r-- | drivers/staging/vme/devices/vme_user.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index 1ab9a98..bc16fc07 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -31,6 +31,7 @@ #include <linux/slab.h> #include <linux/spinlock.h> #include <linux/syscalls.h> +#include <linux/smp_lock.h> #include <linux/types.h> #include <asm/io.h> @@ -130,8 +131,7 @@ static int vme_user_release(struct inode *, struct file *); static ssize_t vme_user_read(struct file *, char *, size_t, loff_t *); static ssize_t vme_user_write(struct file *, const char *, size_t, loff_t *); static loff_t vme_user_llseek(struct file *, loff_t, int); -static int vme_user_ioctl(struct inode *, struct file *, unsigned int, - unsigned long); +static long vme_user_unlocked_ioctl(struct file *, unsigned int, unsigned long); static int __init vme_user_probe(struct device *, int, int); static int __exit vme_user_remove(struct device *, int, int); @@ -142,7 +142,7 @@ static struct file_operations vme_user_fops = { .read = vme_user_read, .write = vme_user_write, .llseek = vme_user_llseek, - .ioctl = vme_user_ioctl, + .unlocked_ioctl = vme_user_unlocked_ioctl, }; @@ -555,6 +555,18 @@ static int vme_user_ioctl(struct inode *inode, struct file *file, return -EINVAL; } +static long +vme_user_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +{ + int ret; + + lock_kernel(); + ret = vme_user_ioctl(file->f_path.dentry->d_inode, file, cmd, arg); + unlock_kernel(); + + return ret; +} + /* * Unallocate a previously allocated buffer |