From: Darshana Padmadas Date: Sat, 20 Sep 2014 15:14:24 +0000 (+0530) Subject: Staging: iio: accel: Replace msleep with usleep for given range X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3ab7c7d48d2a62f9c0183fca05850ccba315ed8b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Staging: iio: accel: Replace msleep with usleep for given range This patch fixes checkpatch.pl warning: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt As per Documentation/timers/timers-howto.txt usleep_range should be used for sleeping for 10us-20ms Signed-off-by: Darshana Padmadas Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/accel/adis16220_core.c b/drivers/staging/iio/accel/adis16220_core.c index 6f38ca95f9bb..d9a1a141099e 100644 --- a/drivers/staging/iio/accel/adis16220_core.c +++ b/drivers/staging/iio/accel/adis16220_core.c @@ -70,7 +70,7 @@ static int adis16220_capture(struct iio_dev *indio_dev) if (ret) dev_err(&indio_dev->dev, "problem beginning capture"); - msleep(10); /* delay for capture to finish */ + usleep_range(10000, 11000); /* delay for capture to finish */ return ret; }