diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-05-22 22:48:48 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 15:16:21 -0700 |
commit | 49f1525546532139e0260ae19ab8012a2bfbd1f3 (patch) | |
tree | 09fe366d23762cfce48f83f3be75454d04ffa486 /drivers/usb/misc/sisusbvga | |
parent | 54592157c7120ea4d6d0014cbbfc327d4b867fe3 (diff) | |
download | kernel_samsung_crespo-49f1525546532139e0260ae19ab8012a2bfbd1f3.zip kernel_samsung_crespo-49f1525546532139e0260ae19ab8012a2bfbd1f3.tar.gz kernel_samsung_crespo-49f1525546532139e0260ae19ab8012a2bfbd1f3.tar.bz2 |
USB: sisusb: Push down the BKL
This is another case where the lock_kernel appears to be unneccessary and
could be removed with a bit more investigative work
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/sisusbvga')
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 33182f4..fbace41 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -2982,9 +2982,8 @@ sisusb_handle_command(struct sisusb_usb_data *sisusb, struct sisusb_command *y, return retval; } -static int -sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) +static long +sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { struct sisusb_usb_data *sisusb; struct sisusb_info x; @@ -2995,6 +2994,7 @@ sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) return -ENODEV; + lock_kernel(); mutex_lock(&sisusb->lock); /* Sanity check */ @@ -3053,6 +3053,7 @@ sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, err_out: mutex_unlock(&sisusb->lock); + unlock_kernel(); return retval; } @@ -3066,9 +3067,7 @@ sisusb_compat_ioctl(struct file *f, unsigned int cmd, unsigned long arg) case SISUSB_GET_CONFIG_SIZE: case SISUSB_GET_CONFIG: case SISUSB_COMMAND: - lock_kernel(); - retval = sisusb_ioctl(f->f_path.dentry->d_inode, f, cmd, arg); - unlock_kernel(); + retval = sisusb_ioctl(f, cmd, arg); return retval; default: @@ -3087,7 +3086,7 @@ static const struct file_operations usb_sisusb_fops = { #ifdef SISUSB_NEW_CONFIG_COMPAT .compat_ioctl = sisusb_compat_ioctl, #endif - .ioctl = sisusb_ioctl + .unlocked_ioctl = sisusb_ioctl }; static struct usb_class_driver usb_sisusb_class = { |