diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-11-21 16:27:00 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-11-30 12:57:06 +0000 |
commit | 3e4334f2d6f3025e396a710f758fd1663c104976 (patch) | |
tree | cdc27f130f8b3e149eebb5fbb4d9d75fbf127dac /drivers/staging | |
parent | e4ac7283639bb8da69af6ff5c00e2340348a339e (diff) |
staging:iio:ad7793: Use usleep_range instead of msleep
It is recommended to use usleep_range instead of msleep for durations smaller
than a 20ms.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/iio/adc/ad7793.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/adc/ad7793.c b/drivers/staging/iio/adc/ad7793.c index bd1358e51ec..55d302dc504 100644 --- a/drivers/staging/iio/adc/ad7793.c +++ b/drivers/staging/iio/adc/ad7793.c @@ -122,7 +122,7 @@ static int ad7793_setup(struct iio_dev *indio_dev, ret = spi_write(st->sd.spi, (u8 *)&ret, sizeof(ret)); if (ret < 0) goto out; - msleep(1); /* Wait for at least 500us */ + usleep_range(500, 2000); /* Wait for at least 500us */ /* write/read test for device presence */ ret = ad_sd_read_reg(&st->sd, AD7793_REG_ID, 1, &id); |