[PATCH 1/1] staging: comedi: dt2801: usleep_range is preferred over udelay

Ian Abbott abbotti at mev.co.uk
Fri Feb 10 15:13:39 UTC 2017


On 09/02/17 14:26, Saber Rezvani wrote:
> Fix the checkpatch.pl issue:
> CHECK: usleep_range is preferred over udelay
>
> Signed-off-by: Saber Rezvani <irsaber at gmail.com>
> ---
>  drivers/staging/comedi/drivers/dt2801.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c
> index c2ce1eb..3080579 100644
> --- a/drivers/staging/comedi/drivers/dt2801.c
> +++ b/drivers/staging/comedi/drivers/dt2801.c
> @@ -343,7 +343,7 @@ static int dt2801_reset(struct comedi_device *dev)
>  	outb_p(DT_C_STOP, dev->iobase + DT2801_CMD);
>
>  	/* dt2801_wait_for_ready(dev); */
> -	udelay(100);
> +	usleep_range(100, 200);
>  	timeout = 10000;
>  	do {
>  		stat = inb_p(dev->iobase + DT2801_STATUS);
> @@ -358,7 +358,7 @@ static int dt2801_reset(struct comedi_device *dev)
>  	outb_p(DT_C_RESET, dev->iobase + DT2801_CMD);
>  	/* dt2801_writecmd(dev,DT_C_RESET); */
>
> -	udelay(100);
> +	usleep_range(100, 200);
>  	timeout = 10000;
>  	do {
>  		stat = inb_p(dev->iobase + DT2801_STATUS);
>

It looks fine, thanks!

Reviewed-by: Ian Abbott <abbotti at mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-


More information about the devel mailing list