Commit 3fe6929b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7022781c
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment