aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial/spcp8x5.c
diff options
context:
space:
mode:
authorJohan Hovold2019-04-21 14:21:54 +0200
committerJohan Hovold2019-04-26 08:38:02 +0200
commit623c46f7b641bc95397eac5c28a04e8e832b9a97 (patch)
treef09b6f45824ab8b35b9ba7bbf24dbaabe4679c93 /drivers/usb/serial/spcp8x5.c
parentd8a7f23c59cfb9420f0f9e22af6fa8afddaba55d (diff)
USB: serial: spcp8x5: simplify init_termios
Simplify init_termios which is only used to override the initial baudrate. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/spcp8x5.c')
-rw-r--r--drivers/usb/serial/spcp8x5.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c
index b42714855364..3bac55bd9bd9 100644
--- a/drivers/usb/serial/spcp8x5.c
+++ b/drivers/usb/serial/spcp8x5.c
@@ -281,10 +281,7 @@ static void spcp8x5_dtr_rts(struct usb_serial_port *port, int on)
static void spcp8x5_init_termios(struct tty_struct *tty)
{
- tty->termios = tty_std_termios;
- tty->termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL;
- tty->termios.c_ispeed = 115200;
- tty->termios.c_ospeed = 115200;
+ tty_encode_baud_rate(tty, 115200, 115200);
}
static void spcp8x5_set_termios(struct tty_struct *tty,