Skip to content

Commit 9e5f399

Browse files
Jiri Slabygregkh
authored andcommitted
tty: serial: document uart_get_console()
This was the only function mentioned in the text, but was neither linked nor documented. So document and link it, so that hyperlinking works in the text. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220728061056.20799-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 987233b commit 9e5f399

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

Documentation/driver-api/serial/driver.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Other functions
7676
uart_add_one_port uart_remove_one_port uart_console_write
7777
uart_parse_earlycon uart_parse_options uart_set_options
7878
uart_get_lsr_info uart_handle_dcd_change uart_handle_cts_change
79-
uart_try_toggle_sysrq
79+
uart_try_toggle_sysrq uart_get_console
8080

8181
Other notes
8282
-----------

drivers/tty/serial/serial_core.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,10 +2092,15 @@ void uart_console_write(struct uart_port *port, const char *s,
20922092
}
20932093
EXPORT_SYMBOL_GPL(uart_console_write);
20942094

2095-
/*
2096-
* Check whether an invalid uart number has been specified, and
2097-
* if so, search for the first available port that does have
2098-
* console support.
2095+
/**
2096+
* uart_get_console - get uart port for console
2097+
* @ports: ports to search in
2098+
* @nr: number of @ports
2099+
* @co: console to search for
2100+
* Returns: uart_port for the console @co
2101+
*
2102+
* Check whether an invalid uart number has been specified (as @co->index), and
2103+
* if so, search for the first available port that does have console support.
20992104
*/
21002105
struct uart_port * __init
21012106
uart_get_console(struct uart_port *ports, int nr, struct console *co)

0 commit comments

Comments
 (0)