[PATCH 9/9] USB: serial: spcp8x5: simplify init_termios

2019-04-21 Thread Johan Hovold
Simplify init_termios which is only used to override the initial baudrate. Signed-off-by: Johan Hovold --- drivers/usb/serial/spcp8x5.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index b42714855364..3bac55bd

[PATCH 4/9] USB: serial: cypress_m8: drop unused termios

2019-04-21 Thread Johan Hovold
Drop driver termios structure that held a copy of the tty termios for no good reason. Signed-off-by: Johan Hovold --- drivers/usb/serial/cypress_m8.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c

[PATCH 3/9] USB: serial: cypress_m8: drop unused driver data flag

2019-04-21 Thread Johan Hovold
Drop the isthrottled flag which has never been used. Signed-off-by: Johan Hovold --- drivers/usb/serial/cypress_m8.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index ed51bc48eea6..8a06e5ffe644 100644 --- a/drivers/usb/seri

[PATCH 5/9] USB: serial: cypress_m8: clean up initial-termios handling

2019-04-21 Thread Johan Hovold
Now that init_termios() is only called on first use, we can clean up the cypress_m8 initial-termios handling. Note that only the earthmate chip type used settings different from the defaults provided by USB serial core, and that the chip type is indeed known when init_termios is called at tty-inst

[PATCH 0/9] USB: serial: fix initial-termios handling

2019-04-21 Thread Johan Hovold
A few drivers override the default initial termios settings provided by USB serial core, but due to a long-standing bug, the terminal settings were being reset on every (first) open rather than on first use after probe as intended. This series fixes the bug and cleans up the various init_termios i

[PATCH 2/9] USB: serial: ark3116: drop redundant init_termios

2019-04-21 Thread Johan Hovold
The initial terminal settings set by the driver matches the default settings provided by core so drop the redundant init_termios callback. Signed-off-by: Johan Hovold --- drivers/usb/serial/ark3116.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/usb/serial/ark3116.c b/d

[PATCH 1/9] USB: serial: fix initial-termios handling

2019-04-21 Thread Johan Hovold
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

[PATCH 8/9] USB: serial: oti6858: simplify init_termios

2019-04-21 Thread Johan Hovold
Simplify init_termios which is only used to override the initial baudrate. Signed-off-by: Johan Hovold --- drivers/usb/serial/oti6858.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index ae9cb15ee02d..38ae0fc8

[PATCH 6/9] USB: serial: iuu_phoenix: drop bogus initial cflag

2019-04-21 Thread Johan Hovold
Drop bogus TIOCM_CTS, which is not a cflag, from the initial terminal settings. Note that the corresponding bit is already set by CS8. Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/serial/iuu_ph

[PATCH 7/9] USB: serial: iuu_phoenix: simplify init_termios

2019-04-21 Thread Johan Hovold
Override the initial terminal settings provided by core directly instead of first resetting them to tty_std_termios. Also reorder the cflags as they are usually seen (in bit order). Signed-off-by: Johan Hovold --- drivers/usb/serial/iuu_phoenix.c | 3 +-- 1 file changed, 1 insertion(+), 2 delet

Re: [PATCH 2/2] USB: serial: digi_acceleport: clean up set_termios

2019-04-21 Thread Johan Hovold
On Fri, Apr 19, 2019 at 10:27:43AM +0200, Greg Kroah-Hartman wrote: > On Thu, Apr 18, 2019 at 06:20:20PM +0200, Johan Hovold wrote: > > Clean up set_termios() by adding missing white space around operators > > and making a couple of continuation lines more readable. > > > > Also drop a couple of r