From: Paul Zimmerman Date: Fri, 27 Apr 2012 09:52:01 +0000 (+0300) Subject: usb: dwc3: gadget: reinitialize retries X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=aed430e5139af3e2c251f52db7fc6c5e2ce2b714;p=openwrt%2Fstaging%2Fblogic.git usb: dwc3: gadget: reinitialize retries retries is used twice without being reinitialized. Signed-off-by: Paul Zimmerman Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 045799356a29..c21516aef5e4 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -108,6 +108,7 @@ int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state) dwc3_writel(dwc->regs, DWC3_DCTL, reg); /* wait for a change in DSTS */ + retries = 10000; while (--retries) { reg = dwc3_readl(dwc->regs, DWC3_DSTS);