Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1480412 > unrolled thread
| Started by | Rob Herring <robh@kernel.org> |
|---|---|
| First post | 2016-09-10 00:40 +0200 |
| Last post | 2016-09-11 23:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[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
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2016-09-10 00:40 +0200 |
| Subject | [PATCH 9/9] tty: serial_core: add tty NULL check in uart_port_startup |
| Message-ID | <sfCCJ-mH-15@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> |
|---|---|
| Date | 2016-09-11 23:30 +0200 |
| Subject | Re: [PATCH 9/9] tty: serial_core: add tty NULL check in uart_port_startup |
| Message-ID | <sgku5-2SE-5@gated-at.bofh.it> |
| In reply to | #1480412 |
On Fri, 9 Sep 2016 17:37:10 -0500 Rob Herring <robh@kernel.org> wrote: > 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. I don't think getting rid of the tty object makes any sense whatsoever just create a kernel one. Either way the giant churny patch and this hack should be deferred in favour of moving the termios structure into the tty port (and the locks for it) and doing the right job once. The termios does I agree belong in the tty_port so irrespective of final direction fixing that is a right move. Alan
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web