]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: daqboard2000: prefer usleep_range()
authorIan Abbott <abbotti@mev.co.uk>
Thu, 19 May 2016 18:15:27 +0000 (19:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Jun 2016 03:57:54 +0000 (20:57 -0700)
commit4e0d95b4144934bbe60b54e49dba7a33d6c19bfb
tree646433a1e7026a44f5e1cde4feed8ef5132f3c39
parenta303da677ffec1ad47a44bfbf3b5eca97868950d
staging: comedi: daqboard2000: prefer usleep_range()

The checkpatch.pl warns about two `udelay(x)` calls, one of 100
microseconds, and one of 10 microseconds.  The 100 microseconds one is
used when waiting for FPGA to become ready to accept firmware, and is
not that critical, so replace it with a call to `usleep_range(100,
1000)`.  The 10 microseconds one is called as each 16-bit word of
firmware data is written.  Replace it with a fairly tight
`usleep_range(10, 20)` to avoid slowing down firmware loading too much.
The firmware is fairly short, so this would only slow it down firmware
loading by about 20 milliseconds or so.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/daqboard2000.c