diff options
author | Felipe Balbi <balbi@ti.com> | 2012-06-25 10:09:28 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-06-25 10:09:28 -0400 |
commit | 9be2395186b3504aa5e337bd3284afb4966caae7 (patch) | |
tree | 4ca1cce6721e6e61247433aa02a7d5f3d905f421 | |
parent | b4996a8631e80a2aaddb5c487ff6b9ad37315f70 (diff) |
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>
-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 1b5fbdd859c2..d98549a7b8b0 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) | |||
1209 | memset(¶ms, 0x00, sizeof(params)); | 1209 | memset(¶ms, 0x00, sizeof(params)); |
1210 | 1210 | ||
1211 | if (value) { | 1211 | if (value) { |
1212 | if (dep->number == 0 || dep->number == 1) { | ||
1213 | /* | ||
1214 | * Whenever EP0 is stalled, we will restart | ||
1215 | * the state machine, thus moving back to | ||
1216 | * Setup Phase | ||
1217 | */ | ||
1218 | dwc->ep0state = EP0_SETUP_PHASE; | ||
1219 | } | ||
1220 | |||
1221 | ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, | 1212 | ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, |
1222 | DWC3_DEPCMD_SETSTALL, ¶ms); | 1213 | DWC3_DEPCMD_SETSTALL, ¶ms); |
1223 | if (ret) | 1214 | if (ret) |