[PATCH] iio: humidity: Use usleep_range instead of msleep

Roberta Dobrescu roberta.dobrescu at gmail.com
Sat Dec 13 12:16:18 EET 2014


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

Signed-off-by: Roberta Dobrescu <roberta.dobrescu at gmail.com>
---
 drivers/iio/humidity/si7020.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/humidity/si7020.c b/drivers/iio/humidity/si7020.c
index b541646..1116737 100644
--- a/drivers/iio/humidity/si7020.c
+++ b/drivers/iio/humidity/si7020.c
@@ -124,7 +124,7 @@ static int si7020_probe(struct i2c_client *client,
 	if (ret < 0)
 		return ret;
 	/* Wait the maximum power-up time after software reset. */
-	msleep(15);
+	usleep_range(15000, 16000);
 
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*client));
 	if (!indio_dev)
-- 
1.9.1



More information about the firefly mailing list