diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2022-05-19 11:18:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-14 18:44:51 +0200 |
commit | ca34aaff8eb61a0595fcd4e287e8193485b4748a (patch) | |
tree | 27bd2d591012397615c345938ad443f70ac8b5cb | |
parent | 9a4ebbe0f0f076305fcceed92a46c593738deaaf (diff) |
serial: uartlite: Fix BRKINT clearing
[ Upstream commit 3f7fed405c118607d4d42255f2572072db728399 ]
BRKINT is within c_iflag rather than c_cflag.
Fixes: ea017f5853e9 (tty: serial: uartlite: Prevent changing fixed parameters)
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220519081808.3776-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/tty/serial/uartlite.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c index 007db67292a2d..880e2afbb97b6 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c @@ -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); |