aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/rio500.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/rio500.c')
-rw-r--r--drivers/usb/misc/rio500.c8
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
107static int 107static long ioctl_rio(struct file *file, unsigned int cmd, unsigned long arg)
108ioctl_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
255err_out: 254err_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};