提交 3f7fed40 编写于 作者: I Ilpo Järvinen 提交者: Greg Kroah-Hartman

serial: uartlite: Fix BRKINT clearing

BRKINT is within c_iflag rather than c_cflag.

Fixes: ea017f58 (tty: serial: uartlite: Prevent changing fixed parameters)
Reviewed-by: NSean Anderson <sean.anderson@seco.com>
Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220519081808.3776-2-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0258502f
......@@ -321,7 +321,8 @@ static void ulite_set_termios(struct uart_port *port, struct ktermios *termios,
struct uartlite_data *pdata = port->private_data;
/* Set termios to what the hardware supports */
termios->c_cflag &= ~(BRKINT | CSTOPB | PARENB | PARODD | CSIZE);
termios->c_iflag &= ~BRKINT;
termios->c_cflag &= ~(CSTOPB | PARENB | PARODD | CSIZE);
termios->c_cflag |= pdata->cflags & (PARENB | PARODD | CSIZE);
tty_termios_encode_baud_rate(termios, pdata->baud, pdata->baud);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册