mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 17:06:24 -04:00
Staging: iio: adc: Refine delay computation
As per comment in function ad7280_delay, conversion delay may take up to 250us. We cannot rely on msleep for this because it may sleep longer than intended time for values less than 20ms, so use usleep_range instead. Problem detected using checkpatch.pl. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7ba7528911
commit
e3fe42b149
@@ -188,7 +188,7 @@ static void ad7280_delay(struct ad7280_state *st)
|
||||
if (st->readback_delay_us < 50)
|
||||
udelay(st->readback_delay_us);
|
||||
else
|
||||
msleep(1);
|
||||
usleep_range(250, 500);
|
||||
}
|
||||
|
||||
static int __ad7280_read32(struct ad7280_state *st, unsigned *val)
|
||||
|
||||
Reference in New Issue
Block a user