Commit 481a741a authored by Colin Leitner's avatar Colin Leitner Committed by Ben Hutchings

USB: spcp8x5: correct handling of CS5 setting

commit 711fbdfb upstream.

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: default avatarColin Leitner <colin.leitner@gmail.com>
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent c1bf8d88
...@@ -394,7 +394,6 @@ static void spcp8x5_set_termios(struct tty_struct *tty, ...@@ -394,7 +394,6 @@ 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;
...@@ -410,7 +409,6 @@ static void spcp8x5_set_termios(struct tty_struct *tty, ...@@ -410,7 +409,6 @@ static void spcp8x5_set_termios(struct tty_struct *tty,
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 */
buf[1] |= (cflag & CSTOPB) ? SET_UART_FORMAT_STOP_2 : buf[1] |= (cflag & CSTOPB) ? SET_UART_FORMAT_STOP_2 :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment