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:31:24 +0000 (22:31 +0200)
commit6952a0956e8bafcec79a13c59dfa7566dce11205
treee157581f540fb43dc58226b8cafd4f1e0352333a
parent083aa6a5d3b3248cb8078a8880fa036dd7a66d93
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