]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tty/serial: atmel: Add is_half_duplex helper
authorRazvan Stefanescu <razvan.stefanescu@microchip.com>
Tue, 19 Mar 2019 13:20:34 +0000 (15:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2019 20:29:04 +0000 (22:29 +0200)
commitab18aa0d0c6d07438a098b3d5d285ec4cf4869b8
treed2f7a0f81856a81c5c229f4e44d24f4cb20b14d1
parent627f9c3af3845789a31cab587b49037c62255093
tty/serial: atmel: Add is_half_duplex helper

commit f3040983132bf3477acd45d2452a906e67c2fec9 upstream.

Use a helper function to check that a port needs to use half duplex
communication, replacing several occurrences of multi-line bit checking.

Fixes: b389f173aaa1 ("tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@microchip.com>
Acked-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c