Skip to contentSkip to conversation

USB: serial: oti6858: simplify init_termios

PATCH In review Johan Hovold 1 participant 1 message Apr 21, 2019

Subsystems (2)
lore
Share & tools
lore

Johan Hovold

author maintainer
#0 lore raw

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

Simplify init_termios which is only used to override the initial baudrate.

---
 drivers/usb/serial/oti6858.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/usb/serial/oti6858.c +1 -4
index ae9cb15ee02d..38ae0fc826cc 100644
@@ -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,