Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78692cc3 authored by Colin Leitner's avatar Colin Leitner Committed by Greg Kroah-Hartman
Browse files

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: default avatarColin Leitner <colin.leitner@gmail.com>
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 711fbdfb
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
@@ -1813,7 +1813,6 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
	iflag = tty->termios.c_iflag;

	/* Change the number of bits */
	if (cflag & CSIZE) {
	switch (cflag & CSIZE) {
	case CS5:
		lData = LCR_BITS_5;
@@ -1826,12 +1825,13 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
	case CS7:
		lData = LCR_BITS_7;
		break;

	default:
	case CS8:
		lData = LCR_BITS_8;
		break;
	}
	}

	/* Change the Parity bit */
	if (cflag & PARENB) {
		if (cflag & PARODD) {