diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-01-31 14:27:00 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-02-02 09:22:48 +0000 |
commit | 619036e216ce4d34f6d51ad2cf50380a54734c18 (patch) | |
tree | e7cf948d51c98bd25259ad795c7ddca116d4a546 | |
parent | 457b71df27e4e6125b6627ad3d4ae1da023fc908 (diff) | |
download | op-kernel-dev-619036e216ce4d34f6d51ad2cf50380a54734c18.zip op-kernel-dev-619036e216ce4d34f6d51ad2cf50380a54734c18.tar.gz |
staging:iio:adxrs450: Use usleep_range for the sequential transfer dealy
The adxrs450 requires a delay of at least 0.1 ms between register writes. Using
msleep() for such small delays is not recommended. So use usleep_range instead.
Fixes the following checkpatch warning:
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/staging/iio/gyro/adxrs450_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/gyro/adxrs450_core.c b/drivers/staging/iio/gyro/adxrs450_core.c index ea10f84..4115fe1 100644 --- a/drivers/staging/iio/gyro/adxrs450_core.c +++ b/drivers/staging/iio/gyro/adxrs450_core.c @@ -101,7 +101,7 @@ static int adxrs450_spi_write_reg_16(struct iio_dev *indio_dev, if (ret) dev_err(&st->us->dev, "problem while writing 16 bit register 0x%02x\n", reg_address); - msleep(1); /* enforce sequential transfer delay 0.1ms */ + usleep_range(100, 1000); /* enforce sequential transfer delay 0.1ms */ mutex_unlock(&st->buf_lock); return ret; } |