Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alan Cox and committed by
Greg Kroah-Hartman
54592157 f1b5a7fe

+4 -4
+4 -4
drivers/usb/misc/rio500.c
··· 104 104 return 0; 105 105 } 106 106 107 - static int 108 - ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd, 109 - unsigned long arg) 107 + static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg) 110 108 { 111 109 struct RioCommand rio_cmd; 112 110 struct rio_usb_data *rio = &rio_instance; ··· 114 116 int retries; 115 117 int retval=0; 116 118 119 + lock_kernel(); 117 120 mutex_lock(&(rio->lock)); 118 121 /* Sanity check to make sure rio is connected, powered, etc */ 119 122 if (rio->present == 0 || rio->rio_dev == NULL) { ··· 253 254 254 255 err_out: 255 256 mutex_unlock(&(rio->lock)); 257 + unlock_kernel(); 256 258 return retval; 257 259 } 258 260 ··· 433 433 .owner = THIS_MODULE, 434 434 .read = read_rio, 435 435 .write = write_rio, 436 - .ioctl = ioctl_rio, 436 + .unlocked_ioctl = ioctl_rio, 437 437 .open = open_rio, 438 438 .release = close_rio, 439 439 };