staging: comedi: dt2801: usleep_range is preferred over udelay
authorSaber Rezvani <irsaber@gmail.com>
Thu, 9 Feb 2017 14:26:02 +0000 (17:56 +0330)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Feb 2017 12:22:08 +0000 (13:22 +0100)
Fix the checkpatch.pl issue:
CHECK: usleep_range is preferred over udelay

Signed-off-by: Saber Rezvani <irsaber@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/dt2801.c

index c2ce1eb87385528364d4ca597cec0deeb9367db3..30805797a957ebbc323737368c7573581ec130c7 100644 (file)
@@ -343,7 +343,7 @@ static int dt2801_reset(struct comedi_device *dev)
        outb_p(DT_C_STOP, dev->iobase + DT2801_CMD);
 
        /* dt2801_wait_for_ready(dev); */
-       udelay(100);
+       usleep_range(100, 200);
        timeout = 10000;
        do {
                stat = inb_p(dev->iobase + DT2801_STATUS);
@@ -358,7 +358,7 @@ static int dt2801_reset(struct comedi_device *dev)
        outb_p(DT_C_RESET, dev->iobase + DT2801_CMD);
        /* dt2801_writecmd(dev,DT_C_RESET); */
 
-       udelay(100);
+       usleep_range(100, 200);
        timeout = 10000;
        do {
                stat = inb_p(dev->iobase + DT2801_STATUS);