From 1225541cfd5f0b32edfd680ab6b3af5ad4af36c4 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 12 Jul 2023 10:18:08 +0200 Subject: [PATCH] serial: pass state to __uart_start() directly __uart_start() does not need a tty struct. It works only with uart_state. So pass the latter directly. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20230712081811.29004-8-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/serial_core.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index bef507c..306ea1a 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -133,9 +133,8 @@ static void uart_stop(struct tty_struct *tty) uart_port_unlock(port, flags); } -static void __uart_start(struct tty_struct *tty) +static void __uart_start(struct uart_state *state) { - struct uart_state *state = tty->driver_data; struct uart_port *port = state->uart_port; struct serial_port_device *port_dev; int err; @@ -170,7 +169,7 @@ static void uart_start(struct tty_struct *tty) unsigned long flags; port = uart_port_lock(state, flags); - __uart_start(tty); + __uart_start(state); uart_port_unlock(port, flags); } @@ -239,7 +238,7 @@ static void uart_change_line_settings(struct tty_struct *tty, struct uart_state if (!old_hw_stopped) uport->ops->stop_tx(uport); else - __uart_start(tty); + __uart_start(state); } spin_unlock_irq(&uport->lock); } @@ -619,7 +618,7 @@ static int uart_write(struct tty_struct *tty, ret += c; } - __uart_start(tty); + __uart_start(state); uart_port_unlock(port, flags); return ret; } -- 2.7.4