diff options
Diffstat (limited to 'drivers/usb/serial/ark3116.c')
-rw-r--r-- | drivers/usb/serial/ark3116.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 5dd710e9fe7d..c0e4df87ff22 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c @@ -200,21 +200,8 @@ static void ark3116_set_termios(struct tty_struct *tty, __u8 lcr, hcr, eval; /* set data bit count */ - switch (cflag & CSIZE) { - case CS5: - lcr = UART_LCR_WLEN5; - break; - case CS6: - lcr = UART_LCR_WLEN6; - break; - case CS7: - lcr = UART_LCR_WLEN7; - break; - default: - case CS8: - lcr = UART_LCR_WLEN8; - break; - } + lcr = UART_LCR_WLEN(tty_get_char_size(cflag)); + if (cflag & CSTOPB) lcr |= UART_LCR_STOP; if (cflag & PARENB) |