Skip to content

Commit

Permalink
serial: fsl_lpuart: remove RTSCTS handling from get_mctrl()
Browse files Browse the repository at this point in the history
[ Upstream commit e60c299 ]

The wrong code in set_mctrl() was already removed in commit 2b30efe
("tty: serial: lpuart: Remove unnecessary code from set_mctrl"), but the
code in get_mctrl() wasn't removed. It will not return the state of the
RTS or CTS line but whether automatic flow control is enabled, which is
wrong for the get_mctrl(). Thus remove it.

Fixes: 2b30efe ("tty: serial: lpuart: Remove unnecessary code from set_mctrl")
Signed-off-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20210512141255.18277-7-michael@walle.cc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
mwalle authored and gregkh committed Jul 14, 2021
1 parent 4504f23 commit 5129295
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/tty/serial/fsl_lpuart.c
Expand Up @@ -1408,17 +1408,7 @@ static unsigned int lpuart_get_mctrl(struct uart_port *port)

static unsigned int lpuart32_get_mctrl(struct uart_port *port)
{
unsigned int temp = 0;
unsigned long reg;

reg = lpuart32_read(port, UARTMODIR);
if (reg & UARTMODIR_TXCTSE)
temp |= TIOCM_CTS;

if (reg & UARTMODIR_RXRTSE)
temp |= TIOCM_RTS;

return temp;
return 0;
}

static void lpuart_set_mctrl(struct uart_port *port, unsigned int mctrl)
Expand Down

0 comments on commit 5129295

Please sign in to comment.