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

Commit 7fa36a99 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

USB: digi_acceleport: fix termios and also readability a bit



- Expand some x&y to x & y so I could read it when checking
- Clear CMSPAR bit in the termios (as the driver does not support it)
- Encode the speed using the new tty_encode_baud_rate facility

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 73f59308
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -973,6 +973,8 @@ static void digi_set_termios(struct usb_serial_port *port,
		}
	}
	/* set parity */
	tty->termios->c_cflag &= ~CMSPAR;

	if ((cflag&(PARENB|PARODD)) != (old_cflag&(PARENB|PARODD))) {
		if (cflag&PARENB) {
			if (cflag&PARODD)
@@ -1089,7 +1091,7 @@ static void digi_set_termios(struct usb_serial_port *port,
	}
	if ((ret = digi_write_oob_command(port, buf, i, 1)) != 0)
		dbg("digi_set_termios: write oob failed, ret=%d", ret);

	tty_encode_baud_rate(tty, baud, baud);
}