diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-05-22 17:47:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 18:16:20 -0400 |
commit | 54592157c7120ea4d6d0014cbbfc327d4b867fe3 (patch) | |
tree | b910f60432af71646ab763eea0c24f88d380942b /drivers | |
parent | f1b5a7fe1718393f67fa6222a1cc27f97e12c4b3 (diff) |
USB: rio100: Push down the BKL
The BKL is actually probably not needed as the mutex seems sufficient. If
so then a further patch to drop it would be a good followup.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/misc/rio500.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c index 330c18e390b8..248a12aacef6 100644 --- a/drivers/usb/misc/rio500.c +++ b/drivers/usb/misc/rio500.c | |||
@@ -104,9 +104,7 @@ static int close_rio(struct inode *inode, struct file *file) | |||
104 | return 0; | 104 | return 0; |
105 | } | 105 | } |
106 | 106 | ||
107 | static int | 107 | static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg) |
108 | ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd, | ||
109 | unsigned long arg) | ||
110 | { | 108 | { |
111 | struct RioCommand rio_cmd; | 109 | struct RioCommand rio_cmd; |
112 | struct rio_usb_data *rio = &rio_instance; | 110 | struct rio_usb_data *rio = &rio_instance; |
@@ -116,6 +114,7 @@ ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd, | |||
116 | int retries; | 114 | int retries; |
117 | int retval=0; | 115 | int retval=0; |
118 | 116 | ||
117 | lock_kernel(); | ||
119 | mutex_lock(&(rio->lock)); | 118 | mutex_lock(&(rio->lock)); |
120 | /* Sanity check to make sure rio is connected, powered, etc */ | 119 | /* Sanity check to make sure rio is connected, powered, etc */ |
121 | if (rio->present == 0 || rio->rio_dev == NULL) { | 120 | if (rio->present == 0 || rio->rio_dev == NULL) { |
@@ -254,6 +253,7 @@ ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd, | |||
254 | 253 | ||
255 | err_out: | 254 | err_out: |
256 | mutex_unlock(&(rio->lock)); | 255 | mutex_unlock(&(rio->lock)); |
256 | unlock_kernel(); | ||
257 | return retval; | 257 | return retval; |
258 | } | 258 | } |
259 | 259 | ||
@@ -433,7 +433,7 @@ file_operations usb_rio_fops = { | |||
433 | .owner = THIS_MODULE, | 433 | .owner = THIS_MODULE, |
434 | .read = read_rio, | 434 | .read = read_rio, |
435 | .write = write_rio, | 435 | .write = write_rio, |
436 | .ioctl = ioctl_rio, | 436 | .unlocked_ioctl = ioctl_rio, |
437 | .open = open_rio, | 437 | .open = open_rio, |
438 | .release = close_rio, | 438 | .release = close_rio, |
439 | }; | 439 | }; |