summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2019-04-21 14:21:53 +0200
committerJohan Hovold <johan@kernel.org>2019-04-26 08:38:00 +0200
commitd8a7f23c59cfb9420f0f9e22af6fa8afddaba55d (patch)
treec1e43ee876180601e32a6dec5f86bd0021878b7e
parent42deef1592d2c04ad1e0c9d12fbd841037019396 (diff)
USB: serial: oti6858: simplify init_termios
Simplify init_termios which is only used to override the initial baudrate. Signed-off-by: Johan Hovold <johan@kernel.org>
-rw-r--r--drivers/usb/serial/oti6858.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index ae9cb15ee02d..38ae0fc826cc 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -393,10 +393,7 @@ static int oti6858_chars_in_buffer(struct tty_struct *tty)
static void oti6858_init_termios(struct tty_struct *tty)
{
- tty->termios = tty_std_termios;
- tty->termios.c_cflag = B38400 | CS8 | CREAD | HUPCL | CLOCAL;
- tty->termios.c_ispeed = 38400;
- tty->termios.c_ospeed = 38400;
+ tty_encode_baud_rate(tty, 38400, 38400);
}
static void oti6858_set_termios(struct tty_struct *tty,