Staging: iio: adc: Use usleep_range instead of msleep
authorVaishali Thakkar <vthakkar1994@gmail.com>
Wed, 24 Sep 2014 11:46:54 +0000 (17:16 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Sep 2014 02:17:22 +0000 (22:17 -0400)
This patch fixes following checkpatch.pl warning:

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/adc/ad7192.c

index 83bb44b381524bc448929ccab8fe29ffad92c496..c110a255d4e8d53933acbdf19866afcffce155da 100644 (file)
@@ -213,7 +213,7 @@ static int ad7192_setup(struct ad7192_state *st,
        ret = spi_write(st->sd.spi, &ones, 6);
        if (ret < 0)
                goto out;
-       msleep(1); /* Wait for at least 500us */
+       usleep_range(500, 1000); /* Wait for at least 500us */
 
        /* write/read test for device presence */
        ret = ad_sd_read_reg(&st->sd, AD7192_REG_ID, 1, &id);