summaryrefslogtreecommitdiff
path: root/drivers/usb/renesas_usbhs/rcar3.c
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2019-01-17 16:24:15 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-18 10:00:49 +0100
commitbb09779f879371fcf0b8f07d932451966cd3b3f3 (patch)
treed6c266a63449a9b00ab10fbc60444e4eea7fb7f9 /drivers/usb/renesas_usbhs/rcar3.c
parentfecb28291404786b921c3f116aedb17a04fa4884 (diff)
usb: renesas_usbhs: replace udelay() with usleep_range()
According to Documentation/timers/timers-howto.txt, a driver should use usleep_range() instead of udelay() on NON-ATOMIC CONTEXT if "SLEEPING FOR ~USECS OR SMALL MSECS ( 10us - 20ms)". Since the .hardware_init() and .power_ctrl() will run on NON-ATOMIC CONTEXT, this patch replaces udelay() with usleep_range(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/renesas_usbhs/rcar3.c')
-rw-r--r--drivers/usb/renesas_usbhs/rcar3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/rcar3.c b/drivers/usb/renesas_usbhs/rcar3.c
index aa3820448286..5e730e9b40ef 100644
--- a/drivers/usb/renesas_usbhs/rcar3.c
+++ b/drivers/usb/renesas_usbhs/rcar3.c
@@ -59,7 +59,7 @@ static int usbhs_rcar3_power_ctrl(struct platform_device *pdev,
if (enable) {
usbhs_bset(priv, LPSTS, LPSTS_SUSPM, LPSTS_SUSPM);
/* The controller on R-Car Gen3 needs to wait up to 45 usec */
- udelay(45);
+ usleep_range(45, 90);
} else {
usbhs_bset(priv, LPSTS, LPSTS_SUSPM, 0);
}