mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
serial: core: mark port as initialized in autoconfig
This is a followup on44117a1d17("serial: core: mark port as initialized after successful IRQ change"). Nikola has been using autoconfig via setserial and reported a crash similar to what I fixed in the earlier mentioned commit. Here I do the same fixup for the autoconfig. I wasn't sure that this is the right approach. Nikola confirmed that it fixes his crash. Fixes:b3b5764618("tty: serial_core: convert uart_open to use tty_port_open") Link: http://lkml.kernel.org/r/[email protected] Reported-by: Nikola Ciprich <[email protected]> Tested-by: Nikola Ciprich <[email protected]> Cc: <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Tested-by: Nikola Ciprich <[email protected]> Acked-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
e7f3e99cb1
commit
714569064a
1 changed files with 2 additions and 0 deletions
|
|
@ -1144,6 +1144,8 @@ static int uart_do_autoconfig(struct tty_struct *tty,struct uart_state *state)
|
|||
uport->ops->config_port(uport, flags);
|
||||
|
||||
ret = uart_startup(tty, state, 1);
|
||||
if (ret == 0)
|
||||
tty_port_set_initialized(port, true);
|
||||
if (ret > 0)
|
||||
ret = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue