summaryrefslogtreecommitdiff
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-08-05 17:25:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-04 12:43:51 +0200
commit3f72879e005ecec835ec75f7d8455c04b29de045 (patch)
treeaa767e7b1329a4822f2cb105c4d68409c5d5f914 /drivers/tty/serial
parent653d00c8d0f14b5aec8804b8ab107d5ac70b4a12 (diff)
serial: 8250_exar: Replace msleep(1) with usleep_range()
As explained in Documentation/timers/timers-howto.rst the small amount of milliseconds sometimes produces much longer delays. Replace msleep(1) with usleep_range(1000, 1100). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20190805142535.21948-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/8250/8250_exar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 873aa6b0c2f3..597eb9d16f21 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -180,7 +180,7 @@ static void exar_shutdown(struct uart_port *port)
tx_complete = 1;
else
tx_complete = 0;
- msleep(1);
+ usleep_range(1000, 1100);
} while (!uart_circ_empty(xmit) && !tx_complete && i++ < 1000);
serial8250_do_shutdown(port);