]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: comedi: serial2002: usleep_range is preferred over udelay
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 17 Aug 2015 20:18:42 +0000 (13:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:18 +0000 (18:24 -0700)
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 <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/serial2002.c

index 186ddd431567363107685e5972dcf79a9a406169..c6f985504a80977944b2784b116a7b5d3be9561e 100644 (file)
@@ -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);