since all other IRQ types now do all necessary
checks inside their handlers, transmit_chars()
was the only one left expecting serial_omap_irq()
to check THRE for it. We can move THRE check to
transmit_chars() in order to make serial_omap_irq()
more uniform.
Tested-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        pm_runtime_put_autosuspend(up->dev);
 }
 
-static void transmit_chars(struct uart_omap_port *up)
+static void transmit_chars(struct uart_omap_port *up, unsigned int lsr)
 {
        struct circ_buf *xmit = &up->port.state->xmit;
        int count;
 
+       if (!(lsr & UART_LSR_THRE))
+               return;
+
        if (up->port.x_char) {
                serial_out(up, UART_TX, up->port.x_char);
                up->port.icount.tx++;
                        check_modem_status(up);
                        break;
                case UART_IIR_THRI:
-                       if (lsr & UART_LSR_THRE)
-                               transmit_chars(up);
+                       transmit_chars(up, lsr);
                        break;
                case UART_IIR_RX_TIMEOUT:
                        /* FALLTHROUGH */