diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-05-22 17:06:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 18:16:19 -0400 |
commit | 824f16fda56a88267aba9b2580d7566cf56a0860 (patch) | |
tree | f4e93bd841d8b5b865315e78dd73d2c5b5905a47 /drivers/usb/misc | |
parent | 5cb4aeca8e8c29605703be5576825eb3257d8a92 (diff) |
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.c | 8 |
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: | |||
474 | /** | 474 | /** |
475 | * iowarrior_ioctl | 475 | * iowarrior_ioctl |
476 | */ | 476 | */ |
477 | static int iowarrior_ioctl(struct inode *inode, struct file *file, | 477 | static long iowarrior_ioctl(struct file *file, unsigned int cmd, |
478 | unsigned int cmd, unsigned long arg) | 478 | unsigned long arg) |
479 | { | 479 | { |
480 | struct iowarrior *dev = NULL; | 480 | struct iowarrior *dev = NULL; |
481 | __u8 *buffer; | 481 | __u8 *buffer; |
@@ -493,6 +493,7 @@ static int iowarrior_ioctl(struct inode *inode, struct file *file, | |||
493 | return -ENOMEM; | 493 | return -ENOMEM; |
494 | 494 | ||
495 | /* lock this object */ | 495 | /* lock this object */ |
496 | lock_kernel(); | ||
496 | mutex_lock(&dev->mutex); | 497 | mutex_lock(&dev->mutex); |
497 | 498 | ||
498 | /* verify that the device wasn't unplugged */ | 499 | /* verify that the device wasn't unplugged */ |
@@ -584,6 +585,7 @@ static int iowarrior_ioctl(struct inode *inode, struct file *file, | |||
584 | error_out: | 585 | error_out: |
585 | /* unlock the device */ | 586 | /* unlock the device */ |
586 | mutex_unlock(&dev->mutex); | 587 | mutex_unlock(&dev->mutex); |
588 | unlock_kernel(); | ||
587 | kfree(buffer); | 589 | kfree(buffer); |
588 | return retval; | 590 | return retval; |
589 | } | 591 | } |
@@ -719,7 +721,7 @@ static const struct file_operations iowarrior_fops = { | |||
719 | .owner = THIS_MODULE, | 721 | .owner = THIS_MODULE, |
720 | .write = iowarrior_write, | 722 | .write = iowarrior_write, |
721 | .read = iowarrior_read, | 723 | .read = iowarrior_read, |
722 | .ioctl = iowarrior_ioctl, | 724 | .unlocked_ioctl = iowarrior_ioctl, |
723 | .open = iowarrior_open, | 725 | .open = iowarrior_open, |
724 | .release = iowarrior_release, | 726 | .release = iowarrior_release, |
725 | .poll = iowarrior_poll, | 727 | .poll = iowarrior_poll, |