summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2019-04-11 06:31:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-16 14:15:54 +0300
commitc901556a43d282f6666e5fb8fbd3066dcb17c907 (patch)
treebeb139e57bc9e8a4bc826588f5f4f28f80961045
parentae26aa844679cdf660e12c7055f958cb90889eb6 (diff)
downloadlinux-c901556a43d282f6666e5fb8fbd3066dcb17c907.tar.xz
staging: wilc1000: give usleep_range a range
usleep_range() is called in non-atomic context so there is little point in setting min==max as the jitter of hrtimer is determined by interruptions anyway. usleep_range can only perform the intended coalescence if some room for placing the hrtimer is provided. Given the range of milliseconds the delay will be 2+ anyway - so make it 2-2.5 ms which gives hrtimers space to optimize without negatively impacting performance. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/wilc1000/wilc_wlan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index f5443dea3a09..2b309c8a8fb2 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -408,7 +408,7 @@ void chip_wakeup(struct wilc *wilc)
wilc->hif_func->hif_write_reg(wilc, 1, reg & ~BIT(1));
do {
- usleep_range(2 * 1000, 2 * 1000);
+ usleep_range(2000, 2500);
wilc_get_chipid(wilc, true);
} while (wilc_get_chipid(wilc, true) == 0);
} while (wilc_get_chipid(wilc, true) == 0);
@@ -423,7 +423,7 @@ void chip_wakeup(struct wilc *wilc)
&clk_status_reg);
while ((clk_status_reg & 0x1) == 0) {
- usleep_range(2 * 1000, 2 * 1000);
+ usleep_range(2000, 2500);
wilc->hif_func->hif_read_reg(wilc, 0xf1,
&clk_status_reg);