From: H Hartley Sweeten Date: Wed, 5 Aug 2015 17:45:20 +0000 (-0700) Subject: staging: comedi: me4000: usleep_range is preferred over udelay X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3fe6929bbbca11b015d182d4864d92d0bf5c244d;p=linux-beck.git 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- 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);