summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/mux.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2022-06-13 14:39:05 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-27 15:34:45 +0300
commitf9008285bb69e4713918a665250ab2d356b731ba (patch)
treedd37d533edbf6b5fb962959ecc1484054e932903 /drivers/tty/serial/mux.c
parentab24a01b276508dc884761bcb8e2759c36702377 (diff)
downloadlinux-f9008285bb69e4713918a665250ab2d356b731ba.tar.xz
serial: Drop timeout from uart_port
Since commit 31f6bd7fad3b ("serial: Store character timing information to uart_port"), per frame timing information is available on uart_port. Uart port's timeout can be derived from frame_time by multiplying with fifosize. Most callers of uart_poll_timeout are not made under port's lock. To be on the safe side, make sure frame_time is only accessed once. As fifo_size is effectively a constant, it shouldn't cause any issues. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220613113905.22962-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/mux.c')
-rw-r--r--drivers/tty/serial/mux.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c
index 643dfbcc43f9..0ba0f4d9459d 100644
--- a/drivers/tty/serial/mux.c
+++ b/drivers/tty/serial/mux.c
@@ -481,12 +481,6 @@ static int __init mux_probe(struct parisc_device *dev)
port->line = port_cnt;
port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_MUX_CONSOLE);
- /* The port->timeout needs to match what is present in
- * uart_wait_until_sent in serial_core.c. Otherwise
- * the time spent in msleep_interruptable will be very
- * long, causing the appearance of a console hang.
- */
- port->timeout = HZ / 50;
spin_lock_init(&port->lock);
status = uart_add_one_port(&mux_driver, port);