Skip to content

Commit 1e657d6

Browse files
Jiri Slaby (SUSE)gregkh
authored andcommitted
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) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bfc467d commit 1e657d6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/tty/serial/serial_core.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,9 +2013,8 @@ static const char *uart_type(struct uart_port *port)
20132013

20142014
#ifdef CONFIG_PROC_FS
20152015

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)
20172017
{
2018-
struct uart_state *state = drv->state + i;
20192018
struct tty_port *port = &state->port;
20202019
enum uart_pm_state pm_state;
20212020
struct uart_port *uport;
@@ -2100,7 +2099,7 @@ static int uart_proc_show(struct seq_file *m, void *v)
21002099

21012100
seq_printf(m, "serinfo:1.0 driver%s%s revision:%s\n", "", "", "");
21022101
for (i = 0; i < drv->nr; i++)
2103-
uart_line_info(m, drv, i);
2102+
uart_line_info(m, drv->state + i);
21042103
return 0;
21052104
}
21062105
#endif

0 commit comments

Comments
 (0)