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:32:55 +0000 (22:32 +0200)
commitb6b4bcb40be079dd36db63d85e89422441f7d57d
treebbad673bce2b01a25c05086169e19d2524a5e414
parent2dbc7c66d6dafb7781c55d067d8e406d71a34ccc
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