Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1480412
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 9/9] tty: serial_core: add tty NULL check in uart_port_startup |
| Date | 2016-09-10 00:40 +0200 |
| Message-ID | <sfCCJ-mH-15@gated-at.bofh.it> (permalink) |
| References | <sfCCJ-mH-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If we don't have a tty when calling uart_port_startup, skip the baudrate
and modem control setup which depend on tty->termios struct. Either
tty_port clients will configure the line in a separate call or we'll
move termios into the tty_port.
Signed-off-by: Rob Herring <robh@kernel.org>
---
drivers/tty/serial/serial_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index b9ec9fd688a2..2c3b187d517b 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -199,7 +199,7 @@ static int uart_port_startup(struct tty_port *port, int init_hw)
}
retval = uport->ops->startup(uport);
- if (retval == 0) {
+ if (retval == 0 && tty) {
if (uart_console(uport) && uport->cons->cflag) {
tty->termios.c_cflag = uport->cons->cflag;
uport->cons->cflag = 0;
--
2.9.3
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 9/9] tty: serial_core: add tty NULL check in uart_port_startup Rob Herring <robh@kernel.org> - 2016-09-10 00:40 +0200 Re: [PATCH 9/9] tty: serial_core: add tty NULL check in uart_port_startup One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-09-11 23:30 +0200
csiph-web