Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104576
b: refs/heads/master
c: 824f16f
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Jul 21, 2008
1 parent 9f2f3e4 commit 289958f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 5cb4aeca8e8c29605703be5576825eb3257d8a92
refs/heads/master: 824f16fda56a88267aba9b2580d7566cf56a0860
8 changes: 5 additions & 3 deletions trunk/drivers/usb/misc/iowarrior.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ static ssize_t iowarrior_write(struct file *file,
/**
* iowarrior_ioctl
*/
static int iowarrior_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
static long iowarrior_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct iowarrior *dev = NULL;
__u8 *buffer;
Expand All @@ -493,6 +493,7 @@ static int iowarrior_ioctl(struct inode *inode, struct file *file,
return -ENOMEM;

/* lock this object */
lock_kernel();
mutex_lock(&dev->mutex);

/* verify that the device wasn't unplugged */
Expand Down Expand Up @@ -584,6 +585,7 @@ static int iowarrior_ioctl(struct inode *inode, struct file *file,
error_out:
/* unlock the device */
mutex_unlock(&dev->mutex);
unlock_kernel();
kfree(buffer);
return retval;
}
Expand Down Expand Up @@ -719,7 +721,7 @@ static const struct file_operations iowarrior_fops = {
.owner = THIS_MODULE,
.write = iowarrior_write,
.read = iowarrior_read,
.ioctl = iowarrior_ioctl,
.unlocked_ioctl = iowarrior_ioctl,
.open = iowarrior_open,
.release = iowarrior_release,
.poll = iowarrior_poll,
Expand Down

0 comments on commit 289958f

Please sign in to comment.