mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
serial: fsl_lpuart: clear parity enable bit when disable parity
[ Upstream commit 397bd9211f
]
Current driver only enable parity enable bit and never clear it
when user set the termios. The fix clear the parity enable bit when
PARENB flag is not set in termios->c_cflag.
Cc: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Andy Duan <fugang.duan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c9e666af54
commit
15750c1904
1 changed files with 4 additions and 0 deletions
|
@ -1344,6 +1344,8 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
|
|||
else
|
||||
cr1 &= ~UARTCR1_PT;
|
||||
}
|
||||
} else {
|
||||
cr1 &= ~UARTCR1_PE;
|
||||
}
|
||||
|
||||
/* ask the core to calculate the divisor */
|
||||
|
@ -1487,6 +1489,8 @@ lpuart32_set_termios(struct uart_port *port, struct ktermios *termios,
|
|||
else
|
||||
ctrl &= ~UARTCTRL_PT;
|
||||
}
|
||||
} else {
|
||||
ctrl &= ~UARTCTRL_PE;
|
||||
}
|
||||
|
||||
/* ask the core to calculate the divisor */
|
||||
|
|
Loading…
Reference in a new issue