summaryrefslogtreecommitdiffstats
path: root/drivers/staging/dt3155
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-04-27 20:15:07 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-11 11:35:36 -0700
commitb1f2ac07636aadee5cb077fc7e830908b00fcaae (patch)
tree852211194d15c11389037dce6c413270683c4f26 /drivers/staging/dt3155
parent59200df52cf7d4bfb93aeb30289a8e9d2af3058d (diff)
downloadtalos-obmc-linux-b1f2ac07636aadee5cb077fc7e830908b00fcaae.tar.gz
talos-obmc-linux-b1f2ac07636aadee5cb077fc7e830908b00fcaae.zip
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/dt3155')
-rw-r--r--drivers/staging/dt3155/dt3155_drv.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
index e2c44ec6fc45..7e6095f43f16 100644
--- a/drivers/staging/dt3155/dt3155_drv.c
+++ b/drivers/staging/dt3155/dt3155_drv.c
@@ -63,6 +63,7 @@ extern void printques(int);
#include <linux/types.h>
#include <linux/poll.h>
#include <linux/sched.h>
+#include <linux/smp_lock.h>
#include <asm/io.h>
#include <asm/uaccess.h>
@@ -835,6 +836,17 @@ static unsigned int dt3155_poll (struct file * filp, poll_table *wait)
return 0;
}
+static long
+dt3155_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+ int ret;
+
+ lock_kernel();
+ ret = dt3155_ioctl(file->f_path.dentry->d_inode, file, cmd, arg);
+ unlock_kernel();
+
+ return ret;
+}
/*****************************************************
* file operations supported by DT3155 driver
@@ -842,12 +854,12 @@ static unsigned int dt3155_poll (struct file * filp, poll_table *wait)
* register_chrdev
*****************************************************/
static struct file_operations dt3155_fops = {
- read: dt3155_read,
- ioctl: dt3155_ioctl,
- mmap: dt3155_mmap,
- poll: dt3155_poll,
- open: dt3155_open,
- release: dt3155_close
+ .read = dt3155_read,
+ .unlocked_ioctl = dt3155_unlocked_ioctl,
+ .mmap = dt3155_mmap,
+ .poll = dt3155_poll,
+ .open = dt3155_open,
+ .release = dt3155_close
};
OpenPOWER on IntegriCloud