Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104579
b: refs/heads/master
c: 49f1525
h: refs/heads/master
i:
  104577: 4d28f19
  104575: 9f2f3e4
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Jul 21, 2008
1 parent 630463b commit 2f538f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54592157c7120ea4d6d0014cbbfc327d4b867fe3
refs/heads/master: 49f1525546532139e0260ae19ab8012a2bfbd1f3
13 changes: 6 additions & 7 deletions trunk/drivers/usb/misc/sisusbvga/sisusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2982,9 +2982,8 @@ sisusb_handle_command(struct sisusb_usb_data *sisusb, struct sisusb_command *y,
return retval;
}

static int
sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
static long
sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct sisusb_usb_data *sisusb;
struct sisusb_info x;
Expand All @@ -2995,6 +2994,7 @@ sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
return -ENODEV;

lock_kernel();
mutex_lock(&sisusb->lock);

/* Sanity check */
Expand Down Expand Up @@ -3053,6 +3053,7 @@ sisusb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,

err_out:
mutex_unlock(&sisusb->lock);
unlock_kernel();
return retval;
}

Expand All @@ -3066,9 +3067,7 @@ sisusb_compat_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
case SISUSB_GET_CONFIG_SIZE:
case SISUSB_GET_CONFIG:
case SISUSB_COMMAND:
lock_kernel();
retval = sisusb_ioctl(f->f_path.dentry->d_inode, f, cmd, arg);
unlock_kernel();
retval = sisusb_ioctl(f, cmd, arg);
return retval;

default:
Expand All @@ -3087,7 +3086,7 @@ static const struct file_operations usb_sisusb_fops = {
#ifdef SISUSB_NEW_CONFIG_COMPAT
.compat_ioctl = sisusb_compat_ioctl,
#endif
.ioctl = sisusb_ioctl
.unlocked_ioctl = sisusb_ioctl
};

static struct usb_class_driver usb_sisusb_class = {
Expand Down

0 comments on commit 2f538f0

Please sign in to comment.