summaryrefslogtreecommitdiff
path: root/drivers/staging/qlge
diff options
context:
space:
mode:
authorTobias Alam <tobiasalam@gmail.com>2021-06-14 05:11:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-14 17:40:34 +0300
commit7c0ae9e01d90a3636ba2e43e8d41329833980edf (patch)
treeb225ed57f5c951eaa1402833122973cc8bf02384 /drivers/staging/qlge
parent9866b3133b70cf7799a121cebdf4cf744c30e103 (diff)
downloadlinux-7c0ae9e01d90a3636ba2e43e8d41329833980edf.tar.xz
staging: qlge: change msleep to usleep_range
This patch changes msleep() to usleep_range() based on Documentation/timers/timers-howto.txt. It suggests using usleep_range() for small msec(1ms - 20ms) because msleep() will often sleep longer than the desired value. Issue found by checkpatch. Signed-off-by: Tobias Alam <tobiasalam@gmail.com> Link: https://lore.kernel.org/r/YMa60p5dl0LMV/9D@tobias-VirtualBox Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/qlge')
-rw-r--r--drivers/staging/qlge/qlge_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/qlge/qlge_ethtool.c b/drivers/staging/qlge/qlge_ethtool.c
index b70570b7b467..87d60115ac67 100644
--- a/drivers/staging/qlge/qlge_ethtool.c
+++ b/drivers/staging/qlge/qlge_ethtool.c
@@ -553,7 +553,7 @@ static int qlge_run_loopback_test(struct qlge_adapter *qdev)
atomic_inc(&qdev->lb_count);
}
/* Give queue time to settle before testing results. */
- msleep(2);
+ usleep_range(2000, 2100);
qlge_clean_lb_rx_ring(&qdev->rx_ring[0], 128);
return atomic_read(&qdev->lb_count) ? -EIO : 0;
}