mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-23 22:16:15 +00:00
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>
This commit is contained in:
parent
f1b5a7fe17
commit
54592157c7
@ -104,9 +104,7 @@ static int close_rio(struct inode *inode, struct file *file)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
|
||||||
ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd,
|
|
||||||
unsigned long arg)
|
|
||||||
{
|
{
|
||||||
struct RioCommand rio_cmd;
|
struct RioCommand rio_cmd;
|
||||||
struct rio_usb_data *rio = &rio_instance;
|
struct rio_usb_data *rio = &rio_instance;
|
||||||
@ -116,6 +114,7 @@ ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd,
|
|||||||
int retries;
|
int retries;
|
||||||
int retval=0;
|
int retval=0;
|
||||||
|
|
||||||
|
lock_kernel();
|
||||||
mutex_lock(&(rio->lock));
|
mutex_lock(&(rio->lock));
|
||||||
/* Sanity check to make sure rio is connected, powered, etc */
|
/* Sanity check to make sure rio is connected, powered, etc */
|
||||||
if (rio->present == 0 || rio->rio_dev == NULL) {
|
if (rio->present == 0 || rio->rio_dev == NULL) {
|
||||||
@ -254,6 +253,7 @@ ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd,
|
|||||||
|
|
||||||
err_out:
|
err_out:
|
||||||
mutex_unlock(&(rio->lock));
|
mutex_unlock(&(rio->lock));
|
||||||
|
unlock_kernel();
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -433,7 +433,7 @@ file_operations usb_rio_fops = {
|
|||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = read_rio,
|
.read = read_rio,
|
||||||
.write = write_rio,
|
.write = write_rio,
|
||||||
.ioctl = ioctl_rio,
|
.unlocked_ioctl = ioctl_rio,
|
||||||
.open = open_rio,
|
.open = open_rio,
|
||||||
.release = close_rio,
|
.release = close_rio,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user