• Johan Hovold's avatar
    USB: serial: fix initial-termios handling · 579bebe5
    Johan Hovold authored
    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 fe1ae7fd ("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: 7e29bb4b ("usb-serial: fix termios initialization logic")
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    579bebe5
usb-serial.c 38.1 KB