diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2015-05-05 20:47:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-10 15:57:26 +0300 |
commit | 7b7afb469cfe9eb384028f86ce4ec2fb8946f772 (patch) | |
tree | f40d744908f9302b9c45c37b18b673acdf58145b | |
parent | e899a4165cffe3aa802f813c624e90ce7ca23189 (diff) | |
download | linux-7b7afb469cfe9eb384028f86ce4ec2fb8946f772.tar.xz |
staging: comedi: gsc_hpdi: usleep_range is preferred over udelay
Fix checkpatch issue: "CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt". `udelay()` is only called once
from a place where sleeping is allowed. Replace it with a call to
`usleep_range()` with a reasonable upper limit.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/gsc_hpdi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hpdi.c index 0e04f15feb38..31ff10807260 100644 --- a/drivers/staging/comedi/drivers/gsc_hpdi.c +++ b/drivers/staging/comedi/drivers/gsc_hpdi.c @@ -520,7 +520,7 @@ static int gsc_hpdi_init(struct comedi_device *dev) /* wait 10usec after reset before accessing fifos */ writel(BOARD_RESET_BIT, dev->mmio + BOARD_CONTROL_REG); - udelay(10); + usleep_range(10, 1000); writel(ALMOST_EMPTY_BITS(32) | ALMOST_FULL_BITS(32), dev->mmio + RX_PROG_ALMOST_REG); |