Revert "serial: sc16is7xx: Clear RS485 bits in the shutdown"
authorHui Wang <hui.wang@canonical.com>
Mon, 18 Apr 2022 09:43:39 +0000 (17:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:35:11 +0000 (16:35 +0200)
commitf88e79727fba1430625f794cabd46e1dc9c3837c
tree40fd2040cbf0a599bc7552d5bb9ea845d6edc6bc
parent83d3449e8ae56db4829b8d716c7843f3ed1f5f6e
Revert "serial: sc16is7xx: Clear RS485 bits in the shutdown"

commit 41c606879f89623dd5269eaffea640b915e9e17c upstream.

This reverts commit 927728a34f11b5a27f4610bdb7068317d6fdc72a.

Once the uart_port->rs485->flag is set to SER_RS485_ENABLED, the port
should always work in RS485 mode. If users want the port to leave
RS485 mode, they need to call ioctl() to clear SER_RS485_ENABLED.

So here we shouldn't clear the RS485 bits in the shutdown().

Fixes: 927728a34f11 ("serial: sc16is7xx: Clear RS485 bits in the shutdown")
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20220418094339.678144-1-hui.wang@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c