From fb82061bf7eb2f962cd563d8ba54b7c8416bcb39 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 29 Jul 2015 20:42:49 -0600 Subject: [PATCH] Two more places there THRE is used with inverted sense --- arch | 2 +- configs | 2 +- drivers/serial/uart_16550.c | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch b/arch index a496ef8cbf..7c6c7eff34 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit a496ef8cbf1a2ca1f510e9e319ecc499294027b9 +Subproject commit 7c6c7eff341f787ad59bdfc266ab6045b060f835 diff --git a/configs b/configs index e5ed09ccda..32ab65df78 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit e5ed09ccdabf387ae8de1b124715c91582199fbf +Subproject commit 32ab65df78a76942feae0b2e93d1c1d52e5302d3 diff --git a/drivers/serial/uart_16550.c b/drivers/serial/uart_16550.c index a0ace3ed88..0a471400fe 100644 --- a/drivers/serial/uart_16550.c +++ b/drivers/serial/uart_16550.c @@ -1030,7 +1030,11 @@ static void u16550_txint(struct uart_dev_s *dev, bool enable) static bool u16550_txready(struct uart_dev_s *dev) { struct u16550_s *priv = (struct u16550_s*)dev->priv; +#ifdef CONFIG_16550_THRNE + return ((u16550_serialin(priv, UART_LSR_OFFSET) & UART_LSR_THRNE) == 0); +#else return ((u16550_serialin(priv, UART_LSR_OFFSET) & UART_LSR_THRE) != 0); +#endif } /**************************************************************************** @@ -1044,7 +1048,11 @@ static bool u16550_txready(struct uart_dev_s *dev) static bool u16550_txempty(struct uart_dev_s *dev) { struct u16550_s *priv = (struct u16550_s*)dev->priv; +#ifdef CONFIG_16550_THRNE + return ((u16550_serialin(priv, UART_LSR_OFFSET) & UART_LSR_THRNE) == 0); +#else return ((u16550_serialin(priv, UART_LSR_OFFSET) & UART_LSR_THRE) != 0); +#endif } /****************************************************************************