]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250: Deduplicate rs485 active_timer assignment
authorLukas Wunner <lukas@wunner.de>
Fri, 28 Feb 2020 13:31:05 +0000 (14:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Mar 2020 08:52:02 +0000 (09:52 +0100)
commit1294e3ad3405699af325f9fd346cb7bff85d8cdf
treed7ba9de5c9d5168ea1d544a41ef464e92383171f
parent42bb493ab0ff36d2fe8b3818bdef7c5fecc52dac
serial: 8250: Deduplicate rs485 active_timer assignment

When rs485 transmission over an 8250 port stops, __stop_tx() assigns
active_timer = NULL before calling __stop_tx_rs485().

That function in turn either assigns active_timer = stop_tx_timer and
rearms the timer (in case a delay_rts_after_send needs to be observed)
or directly calls __do_stop_tx_rs485().

Move the assignment active_timer = NULL to __stop_tx_rs485() into the
branch which directly calls __do_stop_tx_rs485(), thereby avoiding a
duplicate assignment and simplifying the code.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: Matwey V. Kornilov <matwey@sai.msu.ru>
Link: https://lore.kernel.org/r/bca638405550eaf92f0c6060b553b687f35885e0.1582895077.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_port.c