]> asedeno.scripts.mit.edu Git - linux.git/commit
USB: serial: fix initial-termios handling
authorJohan Hovold <johan@kernel.org>
Sun, 21 Apr 2019 12:21:46 +0000 (14:21 +0200)
committerJohan Hovold <johan@kernel.org>
Fri, 26 Apr 2019 06:37:53 +0000 (08:37 +0200)
commit579bebe5dd522580019e7b10b07daaf500f9fb1e
treeadfa4cc9a0354c940f462051d479b8b29289ef6d
parent74d8139582bd3f367e92c67349db4d97fe3733ee
USB: serial: fix initial-termios handling

The USB-serial driver init_termios callback is used to override the
default initial terminal settings provided by USB-serial core.

After a bug was fixed in the original implementation introduced by
commit fe1ae7fdd2ee ("tty: USB serial termios bits"), the init_termios
callback was no longer called just once on first use as intended but
rather on every (first) open.

This specifically meant that the terminal settings saved on (final)
close were ignored when reopening a port for drivers overriding the
initial settings.

Also update the outdated function header referring to the creation of
termios objects.

Fixes: 7e29bb4b779f ("usb-serial: fix termios initialization logic")
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/usb-serial.c