diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2019-01-17 16:24:15 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-18 10:00:49 +0100 |
commit | bb09779f879371fcf0b8f07d932451966cd3b3f3 (patch) | |
tree | d6c266a63449a9b00ab10fbc60444e4eea7fb7f9 /drivers/usb/renesas_usbhs/rza.c | |
parent | fecb28291404786b921c3f116aedb17a04fa4884 (diff) | |
download | linux-bb09779f879371fcf0b8f07d932451966cd3b3f3.tar.gz linux-bb09779f879371fcf0b8f07d932451966cd3b3f3.tar.bz2 linux-bb09779f879371fcf0b8f07d932451966cd3b3f3.zip |
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/rza.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/rza.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/renesas_usbhs/rza.c b/drivers/usb/renesas_usbhs/rza.c index 5b287257ec11..8c739bd24acd 100644 --- a/drivers/usb/renesas_usbhs/rza.c +++ b/drivers/usb/renesas_usbhs/rza.c @@ -35,7 +35,7 @@ static int usbhs_rza1_hardware_init(struct platform_device *pdev) /* Enable USB PLL (NOTE: ch0 controls both ch0 and ch1) */ usbhs_bset(priv, SYSCFG, UPLLE, UPLLE); - udelay(1000); + usleep_range(1000, 2000); usbhs_bset(priv, SUSPMODE, SUSPM, SUSPM); return 0; |