From e8f25f6680a8df64409a1fd8bddfe7848ee7c7e0 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 9 Oct 2015 11:53:49 -0700 Subject: [PATCH] staging: comedi: adq12b: usleep_range is preferred over udelay Fix checkpatch.pl issue: CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt Replace the udelay() with usleep_range() with a reasonable upper limit. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adq12b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c index dbb9d588c729..315050454c26 100644 --- a/drivers/staging/comedi/drivers/adq12b.c +++ b/drivers/staging/comedi/drivers/adq12b.c @@ -129,7 +129,7 @@ static int adq12b_ai_insn_read(struct comedi_device *dev, if (val != devpriv->last_ctreg) { outb(val, dev->iobase + ADQ12B_CTREG); devpriv->last_ctreg = val; - udelay(50); /* wait for the mux to settle */ + usleep_range(50, 100); /* wait for the mux to settle */ } val = inb(dev->iobase + ADQ12B_ADLOW); /* trigger A/D */ -- 2.39.5