summaryrefslogtreecommitdiff
path: root/drivers/accessibility
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2022-06-24 23:54:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-27 14:41:31 +0200
commit34619de1b8cb52afa90bbeb3b4fbad34c28f19cf (patch)
tree1e58b35ab75d393d556f2ee9f1a0e01e763eab83 /drivers/accessibility
parenteb47b59afb7e46c952d7b03884245364990d4910 (diff)
downloadlwn-34619de1b8cb52afa90bbeb3b4fbad34c28f19cf.tar.gz
lwn-34619de1b8cb52afa90bbeb3b4fbad34c28f19cf.zip
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.h3
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