diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2015-08-05 10:45:20 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-07 15:03:31 -0700 |
commit | 3fe6929bbbca11b015d182d4864d92d0bf5c244d (patch) | |
tree | b4efd466877eeacf5bde3e8e74430398ed606447 /drivers | |
parent | 7022781c460290687b374dab1c230c06091bba10 (diff) |
staging: comedi: me4000: 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 used in the
firmware upload process. Replace them with `usleep_range()` with a
reasonable upper limit.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/me4000.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index 3974f59c0478..74c16dbd1f8b 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -345,7 +345,7 @@ static int me4000_xilinx_download(struct comedi_device *dev, inb(xilinx_iobase + 0xC8); /* Wait until /INIT pin is set */ - udelay(20); + usleep_range(20, 1000); val = inl(devpriv->plx_regbase + PLX9052_INTCSR); if (!(val & PLX9052_INTCSR_LI2STAT)) { dev_err(dev->class_dev, "Can't init Xilinx\n"); @@ -362,11 +362,11 @@ static int me4000_xilinx_download(struct comedi_device *dev, (((unsigned int)data[1] & 0xff) << 16) + (((unsigned int)data[2] & 0xff) << 8) + ((unsigned int)data[3] & 0xff); - udelay(10); + usleep_range(10, 1000); for (i = 0; i < file_length; i++) { outb(data[16 + i], xilinx_iobase); - udelay(10); + usleep_range(10, 1000); /* Check if BUSY flag is low */ val = inl(devpriv->plx_regbase + PLX9052_CNTRL); |