diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-05-22 17:48:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 18:16:21 -0400 |
commit | 49f1525546532139e0260ae19ab8012a2bfbd1f3 (patch) | |
tree | 09fe366d23762cfce48f83f3be75454d04ffa486 /drivers/usb/misc/sisusbvga/sisusb.c | |
parent | 54592157c7120ea4d6d0014cbbfc327d4b867fe3 (diff) |
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/sisusb.c')
-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 33182f4c2267..fbace41a7cba 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, | |||
2982 | return retval; | 2982 | return retval; |
2983 | } | 2983 | } |
2984 | 2984 | ||
2985 | static int | 2985 | static long |
2986 | sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 2986 | sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
2987 | unsigned long arg) | ||
2988 | { | 2987 | { |
2989 | struct sisusb_usb_data *sisusb; | 2988 | struct sisusb_usb_data *sisusb; |
2990 | struct sisusb_info x; | 2989 | struct sisusb_info x; |
@@ -2995,6 +2994,7 @@ sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
2995 | if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) | 2994 | if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) |
2996 | return -ENODEV; | 2995 | return -ENODEV; |
2997 | 2996 | ||
2997 | lock_kernel(); | ||
2998 | mutex_lock(&sisusb->lock); | 2998 | mutex_lock(&sisusb->lock); |
2999 | 2999 | ||
3000 | /* Sanity check */ | 3000 | /* Sanity check */ |
@@ -3053,6 +3053,7 @@ sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
3053 | 3053 | ||
3054 | err_out: | 3054 | err_out: |
3055 | mutex_unlock(&sisusb->lock); | 3055 | mutex_unlock(&sisusb->lock); |
3056 | unlock_kernel(); | ||
3056 | return retval; | 3057 | return retval; |
3057 | } | 3058 | } |
3058 | 3059 | ||
@@ -3066,9 +3067,7 @@ sisusb_compat_ioctl(struct file *f, unsigned int cmd, unsigned long arg) | |||
3066 | case SISUSB_GET_CONFIG_SIZE: | 3067 | case SISUSB_GET_CONFIG_SIZE: |
3067 | case SISUSB_GET_CONFIG: | 3068 | case SISUSB_GET_CONFIG: |
3068 | case SISUSB_COMMAND: | 3069 | case SISUSB_COMMAND: |
3069 | lock_kernel(); | 3070 | retval = sisusb_ioctl(f, cmd, arg); |
3070 | retval = sisusb_ioctl(f->f_path.dentry->d_inode, f, cmd, arg); | ||
3071 | unlock_kernel(); | ||
3072 | return retval; | 3071 | return retval; |
3073 | 3072 | ||
3074 | default: | 3073 | default: |
@@ -3087,7 +3086,7 @@ static const struct file_operations usb_sisusb_fops = { | |||
3087 | #ifdef SISUSB_NEW_CONFIG_COMPAT | 3086 | #ifdef SISUSB_NEW_CONFIG_COMPAT |
3088 | .compat_ioctl = sisusb_compat_ioctl, | 3087 | .compat_ioctl = sisusb_compat_ioctl, |
3089 | #endif | 3088 | #endif |
3090 | .ioctl = sisusb_ioctl | 3089 | .unlocked_ioctl = sisusb_ioctl |
3091 | }; | 3090 | }; |
3092 | 3091 | ||
3093 | static struct usb_class_driver usb_sisusb_class = { | 3092 | static struct usb_class_driver usb_sisusb_class = { |