mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
serial: fixup backport of "serial: Deassert Transmit Enable on probe in driver-specific way"
When 7c7f9bc986
("serial: Deassert Transmit Enable on probe in
driver-specific way") got backported to 5.15.y, there known as
b079d3775237, some hunks were accidentally left out.
In fsl_lpuart.c, this amounts to uart_remove_one_port() being called
in an error path despite uart_add_one_port() not having been called.
In serial_core.c, it is possible that the omission in
uart_suspend_port() is harmless, but the backport did have the
corresponding hunk in uart_resume_port(), it runs counter to the
original commit's intention of
Skip any invocation of ->set_mctrl() if RS485 is enabled.
and it's certainly better to be aligned with upstream.
Fixes: b079d3775237 ("serial: Deassert Transmit Enable on probe in driver-specific way")
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Dominique MARTINET <dominique.martinet@atmark-techno.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ae14b7746b
commit
50d9fe3f6e
2 changed files with 3 additions and 2 deletions
|
@ -2784,9 +2784,9 @@ static int lpuart_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
failed_irq_request:
|
||||
failed_get_rs485:
|
||||
uart_remove_one_port(&lpuart_reg, &sport->port);
|
||||
failed_attach_port:
|
||||
failed_get_rs485:
|
||||
failed_reset:
|
||||
lpuart_disable_clks(sport);
|
||||
return ret;
|
||||
|
|
|
@ -2225,6 +2225,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
|
|||
|
||||
spin_lock_irq(&uport->lock);
|
||||
ops->stop_tx(uport);
|
||||
if (!(uport->rs485.flags & SER_RS485_ENABLED))
|
||||
ops->set_mctrl(uport, 0);
|
||||
ops->stop_rx(uport);
|
||||
spin_unlock_irq(&uport->lock);
|
||||
|
|
Loading…
Add table
Reference in a new issue