IIO: Change msleep to usleep_range for small msecs
authorAniroop Mathur <a.mathur@samsung.com>
Sat, 26 Nov 2016 03:47:26 +0000 (09:17 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sat, 3 Dec 2016 08:58:40 +0000 (08:58 +0000)
commit071cf2494361fd856f1a6781f9c554da67e35e3c
tree173b553342e17952c5c58dbefe779537608ef07f
parent160d95870c8a44480fad49dc09fa4f0cc04e7098
IIO: Change msleep to usleep_range for small msecs

msleep(1~20) may not do what the caller intends, and will often sleep longer.
(~20 ms actual sleep for any value given in the 1~20ms range)
This is not the desired behaviour for many cases like device resume time,
device suspend time, device enable time, data reading time, etc.
Thus, change msleep to usleep_range for precise wakeups.

Signed-off-by: Aniroop Mathur <a.mathur@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
12 files changed:
drivers/iio/adc/exynos_adc.c
drivers/iio/pressure/bmp280-core.c
drivers/staging/iio/meter/ade7753.c
drivers/staging/iio/meter/ade7753.h
drivers/staging/iio/meter/ade7754.c
drivers/staging/iio/meter/ade7754.h
drivers/staging/iio/meter/ade7758.h
drivers/staging/iio/meter/ade7758_core.c
drivers/staging/iio/meter/ade7759.c
drivers/staging/iio/meter/ade7759.h
drivers/staging/iio/meter/ade7854.c
drivers/staging/iio/meter/ade7854.h