usb: dwc3: ep0: use proper endianess in SetFeature for wIndex
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 24 Oct 2011 09:09:39 +0000 (12:09 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Dec 2011 09:48:25 +0000 (11:48 +0200)
The first access was correct, the second was wrong.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/ep0.c

index 13c898b4cc1d5569988e735c4dfd772f3404a067..7760d00cb902ca120a6dbc5a4d07114c3e9adcc6 100644 (file)
@@ -392,8 +392,7 @@ static int dwc3_ep0_handle_feature(struct dwc3 *dwc,
        case USB_RECIP_ENDPOINT:
                switch (wValue) {
                case USB_ENDPOINT_HALT:
-
-                       dep =  dwc3_wIndex_to_dep(dwc, ctrl->wIndex);
+                       dep =  dwc3_wIndex_to_dep(dwc, wIndex);
                        if (!dep)
                                return -EINVAL;
                        ret = __dwc3_gadget_ep_set_halt(dep, set);