From: H Hartley Sweeten Date: Mon, 17 Aug 2015 20:18:42 +0000 (-0700) Subject: staging: comedi: serial2002: usleep_range is preferred over udelay X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3335dfd1ab5f02915fb2aeeace41526f92d8b560;p=linux-beck.git staging: comedi: serial2002: usleep_range is preferred over udelay Fix checkpatch 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 --- diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index 186ddd431567..c6f985504a80 100644 --- a/drivers/staging/comedi/drivers/serial2002.c +++ b/drivers/staging/comedi/drivers/serial2002.c @@ -175,7 +175,7 @@ static int serial2002_tty_read(struct file *f, int timeout) result = ch; break; } - udelay(100); + usleep_range(100, 1000); } } set_fs(oldfs);