UPSTREAM: usb: dwc3: gadget: remove udelay() from run_stop()
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 9 Jun 2016 13:24:08 +0000 (16:24 +0300)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
testing shows that udelay() is unnecessary as
controller reaches Halted state almost
instantenously as can be seen by our timeout
variable never actually decrementing.

Change-Id: I39aa43a4d26c4e5bf7c2c49569bb5ab0c662e718
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit d807bdd02845d53047346a4ba6d8934597fba6d6)

drivers/usb/dwc3/gadget.c

index 6b3846b6e5ee3ac4b69cecff12e7c51001457158..9ccf044ebb6fa961afbe9d70755f015f39e68e09 100644 (file)
@@ -1594,7 +1594,6 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
                timeout--;
                if (!timeout)
                        return -ETIMEDOUT;
-               udelay(1);
        } while (1);
 
        dwc3_trace(trace_dwc3_gadget, "gadget %s data soft-%s",