diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-30 12:23:30 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-30 12:23:30 -0500 |
commit | c43e0e46adf79c321ed3fbf0351e1005fb8a2413 (patch) | |
tree | 35b9ab361651f649d3c9aa69f159812eba50d154 /drivers/usb/gadget | |
parent | dba3d36b2f0842ed7f25c33cd3a2ccdb3d0df9db (diff) | |
parent | f2257b70b0f9b2fe8f2afd83fc6798dca75930b8 (diff) |
Merge branch 'linus' into core/percpu
Conflicts:
kernel/irq/handle.c
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/composite.c | 9 | ||||
-rw-r--r-- | drivers/usb/gadget/imx_udc.c | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index f2da0269e1b1..5d11c291f1ad 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c | |||
@@ -683,6 +683,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) | |||
683 | struct usb_request *req = cdev->req; | 683 | struct usb_request *req = cdev->req; |
684 | int value = -EOPNOTSUPP; | 684 | int value = -EOPNOTSUPP; |
685 | u16 w_index = le16_to_cpu(ctrl->wIndex); | 685 | u16 w_index = le16_to_cpu(ctrl->wIndex); |
686 | u8 intf = w_index & 0xFF; | ||
686 | u16 w_value = le16_to_cpu(ctrl->wValue); | 687 | u16 w_value = le16_to_cpu(ctrl->wValue); |
687 | u16 w_length = le16_to_cpu(ctrl->wLength); | 688 | u16 w_length = le16_to_cpu(ctrl->wLength); |
688 | struct usb_function *f = NULL; | 689 | struct usb_function *f = NULL; |
@@ -769,10 +770,10 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) | |||
769 | goto unknown; | 770 | goto unknown; |
770 | if (!cdev->config || w_index >= MAX_CONFIG_INTERFACES) | 771 | if (!cdev->config || w_index >= MAX_CONFIG_INTERFACES) |
771 | break; | 772 | break; |
772 | f = cdev->config->interface[w_index]; | 773 | f = cdev->config->interface[intf]; |
773 | if (!f) | 774 | if (!f) |
774 | break; | 775 | break; |
775 | if (w_value && !f->get_alt) | 776 | if (w_value && !f->set_alt) |
776 | break; | 777 | break; |
777 | value = f->set_alt(f, w_index, w_value); | 778 | value = f->set_alt(f, w_index, w_value); |
778 | break; | 779 | break; |
@@ -781,7 +782,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) | |||
781 | goto unknown; | 782 | goto unknown; |
782 | if (!cdev->config || w_index >= MAX_CONFIG_INTERFACES) | 783 | if (!cdev->config || w_index >= MAX_CONFIG_INTERFACES) |
783 | break; | 784 | break; |
784 | f = cdev->config->interface[w_index]; | 785 | f = cdev->config->interface[intf]; |
785 | if (!f) | 786 | if (!f) |
786 | break; | 787 | break; |
787 | /* lots of interfaces only need altsetting zero... */ | 788 | /* lots of interfaces only need altsetting zero... */ |
@@ -808,7 +809,7 @@ unknown: | |||
808 | */ | 809 | */ |
809 | if ((ctrl->bRequestType & USB_RECIP_MASK) | 810 | if ((ctrl->bRequestType & USB_RECIP_MASK) |
810 | == USB_RECIP_INTERFACE) { | 811 | == USB_RECIP_INTERFACE) { |
811 | f = cdev->config->interface[w_index]; | 812 | f = cdev->config->interface[intf]; |
812 | if (f && f->setup) | 813 | if (f && f->setup) |
813 | value = f->setup(f, ctrl); | 814 | value = f->setup(f, ctrl); |
814 | else | 815 | else |
diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index cde8fdf15d5b..77c5d0a8a06e 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c | |||
@@ -297,7 +297,7 @@ void imx_ep_stall(struct imx_ep_struct *imx_ep) | |||
297 | 297 | ||
298 | for (i = 0; i < 100; i ++) { | 298 | for (i = 0; i < 100; i ++) { |
299 | temp = __raw_readl(imx_usb->base + USB_EP_STAT(EP_NO(imx_ep))); | 299 | temp = __raw_readl(imx_usb->base + USB_EP_STAT(EP_NO(imx_ep))); |
300 | if (!temp & EPSTAT_STALL) | 300 | if (!(temp & EPSTAT_STALL)) |
301 | break; | 301 | break; |
302 | udelay(20); | 302 | udelay(20); |
303 | } | 303 | } |