OSDN Git Service

serial: 8250: handle __start_tx() call in start_tx()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 7 Jun 2022 08:41:54 +0000 (11:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 11:44:47 +0000 (13:44 +0200)
commit90574a5b5a048af7c8c1de8977da498f1e2bdce9
tree9de64b935641dd7b602f73c436324f289854432d
parent767cc6681b1b17f4cbba0b8b37bf6dbb1322c9ac
serial: 8250: handle __start_tx() call in start_tx()

As either start_tx_rs485() or start_tx() calls __start_tx() as the last
line of their logic, it makes sense to just move that call into
start_tx(). When start_tx_rs485() wants to defer tx using timer, return
false so start_tx() can return based on it.

Reorganize em485 code in serial8250_start_tx() so that the return can be
shared for the cases where tx start is deferred.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220607084154.8172-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_port.c