Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: pass struct uart_state to uart_line_info()

uart_line_info() wants to work with struct uart_state. Do not pass a
driver and an index. Pass the precomputed struct directly.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250317070046.24386-27-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
1e657d66 bfc467db

+2 -3
+2 -3
drivers/tty/serial/serial_core.c
··· 2013 2013 2014 2014 #ifdef CONFIG_PROC_FS 2015 2015 2016 - static void uart_line_info(struct seq_file *m, struct uart_driver *drv, int i) 2016 + static void uart_line_info(struct seq_file *m, struct uart_state *state) 2017 2017 { 2018 - struct uart_state *state = drv->state + i; 2019 2018 struct tty_port *port = &state->port; 2020 2019 enum uart_pm_state pm_state; 2021 2020 struct uart_port *uport; ··· 2099 2100 2100 2101 seq_printf(m, "serinfo:1.0 driver%s%s revision:%s\n", "", "", ""); 2101 2102 for (i = 0; i < drv->nr; i++) 2102 - uart_line_info(m, drv, i); 2103 + uart_line_info(m, drv->state + i); 2103 2104 return 0; 2104 2105 } 2105 2106 #endif