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>
Wed, 27 Mar 2019 15:27:48 +0000 (00:27 +0900)
commitf3040983132bf3477acd45d2452a906e67c2fec9
treedc6b5ea329ad4bf056b14893fe02396ca5bbae03
parent93bcefd4c6bad4c69dbc4edcd3fbf774b24d930d
tty/serial: atmel: Add is_half_duplex helper

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