summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx/bus_spi.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2020-02-11 11:35:04 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-11 11:15:29 -0800
commitd2bdc492916046da4abe07ec2373bd962f2224e9 (patch)
treeda3e777822d9e4e98fe48d3e2210bf41c13483ea /drivers/staging/wfx/bus_spi.c
parent40a97d55a6b7f52df0a4ff59b860a4d4c2a0283a (diff)
downloadlinux-stable-d2bdc492916046da4abe07ec2373bd962f2224e9.tar.gz
linux-stable-d2bdc492916046da4abe07ec2373bd962f2224e9.tar.bz2
linux-stable-d2bdc492916046da4abe07ec2373bd962f2224e9.zip
staging: wfx: use more power-efficient sleep for reset
Replace udelay() with usleep_range() as all uses are in a sleepable context. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Link: https://lore.kernel.org/r/59e1e4e5bd80c1879ef36eaa59916e47005dbb04.1581416843.git.mirq-linux@rere.qmqm.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/bus_spi.c')
-rw-r--r--drivers/staging/wfx/bus_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c
index e3cd12592662..61e99b09decb 100644
--- a/drivers/staging/wfx/bus_spi.c
+++ b/drivers/staging/wfx/bus_spi.c
@@ -211,9 +211,9 @@ static int wfx_spi_probe(struct spi_device *func)
if (spi_get_device_id(func)->driver_data & WFX_RESET_INVERTED)
gpiod_toggle_active_low(bus->gpio_reset);
gpiod_set_value_cansleep(bus->gpio_reset, 1);
- udelay(100);
+ usleep_range(100, 150);
gpiod_set_value_cansleep(bus->gpio_reset, 0);
- udelay(2000);
+ usleep_range(2000, 2500);
}
INIT_WORK(&bus->request_rx, wfx_spi_request_rx);