提交 711fbdfb 编写于 作者: C Colin Leitner 提交者: Greg Kroah-Hartman

USB: spcp8x5: correct handling of CS5 setting

This patch removes an erroneous check of CSIZE, which made it impossible to set
CS5.

Compiles clean, but couldn't test against hardware.
Signed-off-by: NColin Leitner <colin.leitner@gmail.com>
Signed-off-by: NJohan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 471e42ad
...@@ -348,22 +348,20 @@ static void spcp8x5_set_termios(struct tty_struct *tty, ...@@ -348,22 +348,20 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
} }
/* Set Data Length : 00:5bit, 01:6bit, 10:7bit, 11:8bit */ /* Set Data Length : 00:5bit, 01:6bit, 10:7bit, 11:8bit */
if (cflag & CSIZE) { switch (cflag & CSIZE) {
switch (cflag & CSIZE) { case CS5:
case CS5: buf[1] |= SET_UART_FORMAT_SIZE_5;
buf[1] |= SET_UART_FORMAT_SIZE_5; break;
break; case CS6:
case CS6: buf[1] |= SET_UART_FORMAT_SIZE_6;
buf[1] |= SET_UART_FORMAT_SIZE_6; break;
break; case CS7:
case CS7: buf[1] |= SET_UART_FORMAT_SIZE_7;
buf[1] |= SET_UART_FORMAT_SIZE_7; break;
break; default:
default: case CS8:
case CS8: buf[1] |= SET_UART_FORMAT_SIZE_8;
buf[1] |= SET_UART_FORMAT_SIZE_8; break;
break;
}
} }
/* Set Stop bit2 : 0:1bit 1:2bit */ /* Set Stop bit2 : 0:1bit 1:2bit */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册