Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36398
b: refs/heads/master
c: 8a7471a
h: refs/heads/master
v: v3
  • Loading branch information
Milan Svoboda authored and Greg Kroah-Hartman committed Sep 27, 2006
1 parent 75f0006 commit b7b9a17
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 07cb7f23d07aa4d197dbeb123eb9719c176190ee
refs/heads/master: 8a7471aba19dc526978a03bfe2e3c122712b5900
7 changes: 4 additions & 3 deletions trunk/drivers/usb/gadget/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ ep_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
struct ep_data *data = fd->private_data;
struct usb_ep *ep;
u32 tag;
int value;
int value, length = len;

if ((value = down_interruptible (&data->lock)) < 0)
return value;
Expand Down Expand Up @@ -792,7 +792,6 @@ ep_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
goto fail0;
}
}
value = len;

spin_lock_irq (&data->dev->lock);
if (data->dev->state == STATE_DEV_UNBOUND) {
Expand Down Expand Up @@ -822,8 +821,10 @@ ep_config (struct file *fd, const char __user *buf, size_t len, loff_t *ptr)
data->name);
data->state = STATE_EP_DEFER_ENABLE;
}
if (value == 0)
if (value == 0) {
fd->f_op = &ep_io_operations;
value = length;
}
gone:
spin_unlock_irq (&data->dev->lock);
if (value < 0) {
Expand Down

0 comments on commit b7b9a17

Please sign in to comment.