]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8192u: replace msleep(1) with usleep_range() in r819xU_phy.c
authorXenia Ragiadakou <burzalodowa@gmail.com>
Sun, 23 Jun 2013 03:15:18 +0000 (06:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jun 2013 23:08:33 +0000 (16:08 -0700)
commite3b447c02783170f0bfdac8b9ff360c1e496f8e0
tree4f7eeed079bb421b91c0c52450668d0641a306e6
parentaf03a3dd94df791777e7b3e3fe0c92dcd779c1d8
staging: rtl8192u: replace msleep(1) with usleep_range() in r819xU_phy.c

This patch fixes the following checkpatch warning:
WARNING: msleep < 20ms can sleep for up to 20ms

The implementation of msleep() is based on jiffies timeout
subsystem. Hence, its resolution is constrained by the value
of HZ tick rate. When HZ variable is configured to 100,
the jiffies variable is updated every 10 ms, so a timeout
of 1ms cannot be met using jiffies (it will be rounded up
to 10ms).

This patch replaces msleep(1) with usleep_range(1000, 1000).
usleep_range() uses hrtimers subsystem which is not bound
to HZ value and can provide microsecond-level resolution.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r819xU_phy.c