Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130316
b: refs/heads/master
c: 0888951
h: refs/heads/master
v: v3
  • Loading branch information
Bryan Wu authored and Greg Kroah-Hartman committed Jan 28, 2009
1 parent 2661de0 commit 7db7fda
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: dd4dff8b035f6dda69ece98e20d4c2d76b9f97d1
refs/heads/master: 08889517b3713926169d79d99782192e86acdc67
7 changes: 4 additions & 3 deletions trunk/drivers/usb/gadget/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
struct usb_request *req = cdev->req;
int value = -EOPNOTSUPP;
u16 w_index = le16_to_cpu(ctrl->wIndex);
u8 intf = w_index & 0xFF;
u16 w_value = le16_to_cpu(ctrl->wValue);
u16 w_length = le16_to_cpu(ctrl->wLength);
struct usb_function *f = NULL;
Expand Down Expand Up @@ -769,7 +770,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
goto unknown;
if (!cdev->config || w_index >= MAX_CONFIG_INTERFACES)
break;
f = cdev->config->interface[w_index];
f = cdev->config->interface[intf];
if (!f)
break;
if (w_value && !f->set_alt)
Expand All @@ -781,7 +782,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
goto unknown;
if (!cdev->config || w_index >= MAX_CONFIG_INTERFACES)
break;
f = cdev->config->interface[w_index];
f = cdev->config->interface[intf];
if (!f)
break;
/* lots of interfaces only need altsetting zero... */
Expand All @@ -808,7 +809,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
*/
if ((ctrl->bRequestType & USB_RECIP_MASK)
== USB_RECIP_INTERFACE) {
f = cdev->config->interface[w_index];
f = cdev->config->interface[intf];
if (f && f->setup)
value = f->setup(f, ctrl);
else
Expand Down

0 comments on commit 7db7fda

Please sign in to comment.