diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2022-06-24 23:54:24 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-27 15:41:31 +0300 |
commit | 34619de1b8cb52afa90bbeb3b4fbad34c28f19cf (patch) | |
tree | 1e58b35ab75d393d556f2ee9f1a0e01e763eab83 /drivers/accessibility | |
parent | eb47b59afb7e46c952d7b03884245364990d4910 (diff) | |
download | linux-34619de1b8cb52afa90bbeb3b4fbad34c28f19cf.tar.xz |
serial: Consolidate BOTH_EMPTY use
Per file BOTH_EMPTY defines are littering our source code here and
there. Define once in serial.h and create helper for the check
too.
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220624205424.12686-7-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/accessibility')
-rw-r--r-- | drivers/accessibility/speakup/serialio.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/accessibility/speakup/serialio.h b/drivers/accessibility/speakup/serialio.h index 6f8f86f161bb..b4f9a1925b81 100644 --- a/drivers/accessibility/speakup/serialio.h +++ b/drivers/accessibility/speakup/serialio.h @@ -33,9 +33,8 @@ struct old_serial_port { #define NUM_DISABLE_TIMEOUTS 3 /* buffer timeout in ms */ #define SPK_TIMEOUT 100 -#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) #define spk_serial_tx_busy() \ - ((inb(speakup_info.port_tts + UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY) + (!uart_lsr_tx_empty(inb(speakup_info.port_tts + UART_LSR))) #endif |