Commit 3e4334f2 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent e4ac7283
...@@ -122,7 +122,7 @@ static int ad7793_setup(struct iio_dev *indio_dev, ...@@ -122,7 +122,7 @@ static int ad7793_setup(struct iio_dev *indio_dev,
ret = spi_write(st->sd.spi, (u8 *)&ret, sizeof(ret)); ret = spi_write(st->sd.spi, (u8 *)&ret, sizeof(ret));
if (ret < 0) if (ret < 0)
goto out; goto out;
msleep(1); /* Wait for at least 500us */ usleep_range(500, 2000); /* Wait for at least 500us */
/* write/read test for device presence */ /* write/read test for device presence */
ret = ad_sd_read_reg(&st->sd, AD7793_REG_ID, 1, &id); ret = ad_sd_read_reg(&st->sd, AD7793_REG_ID, 1, &id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment