summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-05-22 22:06:02 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 15:16:19 -0700
commit824f16fda56a88267aba9b2580d7566cf56a0860 (patch)
treef4e93bd841d8b5b865315e78dd73d2c5b5905a47 /drivers/usb/misc
parent5cb4aeca8e8c29605703be5576825eb3257d8a92 (diff)
downloadtalos-op-linux-824f16fda56a88267aba9b2580d7566cf56a0860.tar.gz
talos-op-linux-824f16fda56a88267aba9b2580d7566cf56a0860.zip
USB: iowarrior: Push down BKL
I'm pretty sure the mutex is sufficient for all locking but will come back to that later if the USB folks don't beat me to it. For now get rid of the old BKL ioctl method and wrap the ioctl handler Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/iowarrior.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 1cb54a28347f..e6ca9979e3ae 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -474,8 +474,8 @@ exit:
/**
* iowarrior_ioctl
*/
-static int iowarrior_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long iowarrior_ioctl(struct file *file, unsigned int cmd,
+ unsigned long arg)
{
struct iowarrior *dev = NULL;
__u8 *buffer;
@@ -493,6 +493,7 @@ static int iowarrior_ioctl(struct inode *inode, struct file *file,
return -ENOMEM;
/* lock this object */
+ lock_kernel();
mutex_lock(&dev->mutex);
/* verify that the device wasn't unplugged */
@@ -584,6 +585,7 @@ static int iowarrior_ioctl(struct inode *inode, struct file *file,
error_out:
/* unlock the device */
mutex_unlock(&dev->mutex);
+ unlock_kernel();
kfree(buffer);
return retval;
}
@@ -719,7 +721,7 @@ static const struct file_operations iowarrior_fops = {
.owner = THIS_MODULE,
.write = iowarrior_write,
.read = iowarrior_read,
- .ioctl = iowarrior_ioctl,
+ .unlocked_ioctl = iowarrior_ioctl,
.open = iowarrior_open,
.release = iowarrior_release,
.poll = iowarrior_poll,
OpenPOWER on IntegriCloud