diff options
author | Felipe Balbi <balbi@ti.com> | 2012-06-25 17:09:28 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-06-25 17:09:28 +0300 |
commit | 9be2395186b3504aa5e337bd3284afb4966caae7 (patch) | |
tree | 4ca1cce6721e6e61247433aa02a7d5f3d905f421 /drivers/usb/dwc3 | |
parent | b4996a8631e80a2aaddb5c487ff6b9ad37315f70 (diff) | |
download | op-kernel-dev-9be2395186b3504aa5e337bd3284afb4966caae7.zip op-kernel-dev-9be2395186b3504aa5e337bd3284afb4966caae7.tar.gz |
usb: dwc3: gadget: remove duplicated code from __dwc3_gadget_ep_set_halt
whenever we want to stall ep0, we always call
dwc3_ep0_stall_and_restart() which makes sure
to send ep0state properly rendering the code
in __dwc3_gadget_ep_set_halt() duplicated.
Reported-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 1b5fbdd..d98549a 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1209,15 +1209,6 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value) memset(¶ms, 0x00, sizeof(params)); if (value) { - if (dep->number == 0 || dep->number == 1) { - /* - * Whenever EP0 is stalled, we will restart - * the state machine, thus moving back to - * Setup Phase - */ - dwc->ep0state = EP0_SETUP_PHASE; - } - ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, DWC3_DEPCMD_SETSTALL, ¶ms); if (ret) |