Skip to content

Commit 78692cc

Browse files
cleitnergregkh
authored andcommitted
USB: mos7840: 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: Colin Leitner <colin.leitner@gmail.com> Signed-off-by: Johan Hovold <jhovold@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 711fbdf commit 78692cc

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

‎drivers/usb/serial/mos7840.c‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,25 +1813,25 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
18131813
iflag = tty->termios.c_iflag;
18141814

18151815
/* Change the number of bits */
1816-
if (cflag & CSIZE) {
1817-
switch (cflag & CSIZE) {
1818-
case CS5:
1819-
lData = LCR_BITS_5;
1820-
break;
1816+
switch (cflag & CSIZE) {
1817+
case CS5:
1818+
lData = LCR_BITS_5;
1819+
break;
18211820

1822-
case CS6:
1823-
lData = LCR_BITS_6;
1824-
break;
1821+
case CS6:
1822+
lData = LCR_BITS_6;
1823+
break;
18251824

1826-
case CS7:
1827-
lData = LCR_BITS_7;
1828-
break;
1829-
default:
1830-
case CS8:
1831-
lData = LCR_BITS_8;
1832-
break;
1833-
}
1825+
case CS7:
1826+
lData = LCR_BITS_7;
1827+
break;
1828+
1829+
default:
1830+
case CS8:
1831+
lData = LCR_BITS_8;
1832+
break;
18341833
}
1834+
18351835
/* Change the Parity bit */
18361836
if (cflag & PARENB) {
18371837
if (cflag & PARODD) {

0 commit comments

Comments
 (0)