Both delays are at the lower end of where the use of usleep_range
is recommended. However as both udelay's occur in loops I think it
makes sense to replace them with sleeping equivalents to avoid
longer busy-waits.

Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
 drivers/usb/chipidea/core.c | 2 +-
 drivers/usb/chipidea/udc.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 5b9825a..b9c645b 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -396,7 +396,7 @@ static int hw_controller_reset(struct ci_hdrc *ci)
 
        hw_write(ci, OP_USBCMD, USBCMD_RST, USBCMD_RST);
        while (hw_read(ci, OP_USBCMD, USBCMD_RST)) {
-               udelay(10);
+               usleep_range(10, 20);
                if (count++ > 1000)
                        return -ETIMEDOUT;
        }
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 4fe18ce..70ef2f2 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -326,7 +326,7 @@ static int hw_usb_reset(struct ci_hdrc *ci)
 
        /* wait until all bits cleared */
        while (hw_read(ci, OP_ENDPTPRIME, ~0))
-               udelay(10);             /* not RTOS friendly */
+               usleep_range(10, 20);
 
        /* reset all endpoints ? */
 
-- 
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to