staging: comedi: adq12b: usleep_range is preferred over udelay

Fix checkpatch.pl issue:

CHECK: usleep_range is preferred over udelay; see
       Documentation/timers/timers-howto.txt

Replace the udelay() 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>
This commit is contained in:
H Hartley Sweeten
2015-10-09 11:53:49 -07:00
committed by Greg Kroah-Hartman
parent b4fa9199ca
commit e8f25f6680

View File

@@ -129,7 +129,7 @@ static int adq12b_ai_insn_read(struct comedi_device *dev,
if (val != devpriv->last_ctreg) {
outb(val, dev->iobase + ADQ12B_CTREG);
devpriv->last_ctreg = val;
udelay(50); /* wait for the mux to settle */
usleep_range(50, 100); /* wait for the mux to settle */
}
val = inb(dev->iobase + ADQ12B_ADLOW); /* trigger A/D */