diff options
-rw-r--r-- | drivers/tty/serial/st-asc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index dd3a96e07026..c7f61ac27132 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c | |||
@@ -194,9 +194,9 @@ static inline u32 asc_txfifo_is_empty(struct uart_port *port) | |||
194 | return asc_in(port, ASC_STA) & ASC_STA_TE; | 194 | return asc_in(port, ASC_STA) & ASC_STA_TE; |
195 | } | 195 | } |
196 | 196 | ||
197 | static inline int asc_txfifo_is_full(struct uart_port *port) | 197 | static inline u32 asc_txfifo_is_half_empty(struct uart_port *port) |
198 | { | 198 | { |
199 | return asc_in(port, ASC_STA) & ASC_STA_TF; | 199 | return asc_in(port, ASC_STA) & ASC_STA_THE; |
200 | } | 200 | } |
201 | 201 | ||
202 | static inline const char *asc_port_name(struct uart_port *port) | 202 | static inline const char *asc_port_name(struct uart_port *port) |
@@ -628,7 +628,7 @@ static int asc_get_poll_char(struct uart_port *port) | |||
628 | 628 | ||
629 | static void asc_put_poll_char(struct uart_port *port, unsigned char c) | 629 | static void asc_put_poll_char(struct uart_port *port, unsigned char c) |
630 | { | 630 | { |
631 | while (asc_txfifo_is_full(port)) | 631 | while (!asc_txfifo_is_half_empty(port)) |
632 | cpu_relax(); | 632 | cpu_relax(); |
633 | asc_out(port, ASC_TXBUF, c); | 633 | asc_out(port, ASC_TXBUF, c); |
634 | } | 634 | } |
@@ -783,7 +783,7 @@ static void asc_console_putchar(struct uart_port *port, int ch) | |||
783 | unsigned int timeout = 1000000; | 783 | unsigned int timeout = 1000000; |
784 | 784 | ||
785 | /* Wait for upto 1 second in case flow control is stopping us. */ | 785 | /* Wait for upto 1 second in case flow control is stopping us. */ |
786 | while (--timeout && asc_txfifo_is_full(port)) | 786 | while (--timeout && !asc_txfifo_is_half_empty(port)) |
787 | udelay(1); | 787 | udelay(1); |
788 | 788 | ||
789 | asc_out(port, ASC_TXBUF, ch); | 789 | asc_out(port, ASC_TXBUF, ch); |