diff options
Diffstat (limited to 'drivers/usb/misc/iowarrior.c')
-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, |