[SERIAL] Clean up and fix tty transmission start/stoping
[pandora-kernel.git] / drivers / serial / clps711x.c
index 6242f30..d822896 100644 (file)
@@ -69,8 +69,7 @@
 
 #define tx_enabled(port)       ((port)->unused[0])
 
-static void
-clps711xuart_stop_tx(struct uart_port *port, unsigned int tty_stop)
+static void clps711xuart_stop_tx(struct uart_port *port)
 {
        if (tx_enabled(port)) {
                disable_irq(TX_IRQ(port));
@@ -78,8 +77,7 @@ clps711xuart_stop_tx(struct uart_port *port, unsigned int tty_stop)
        }
 }
 
-static void
-clps711xuart_start_tx(struct uart_port *port, unsigned int tty_start)
+static void clps711xuart_start_tx(struct uart_port *port)
 {
        if (!tx_enabled(port)) {
                enable_irq(TX_IRQ(port));
@@ -143,10 +141,7 @@ static irqreturn_t clps711xuart_int_rx(int irq, void *dev_id, struct pt_regs *re
                 * CHECK: does overrun affect the current character?
                 * ASSUMPTION: it does not.
                 */
-               if ((ch & port->ignore_status_mask & ~RXSTAT_OVERRUN) == 0)
-                       tty_insert_flip_char(tty, ch, flg);
-               if ((ch & ~port->ignore_status_mask & RXSTAT_OVERRUN) == 0)
-                       tty_insert_flip_char(tty, 0, TTY_OVERRUN);
+               uart_insert_char(port, ch, UARTDR_OVERR, ch, flg);
 
        ignore_char:
                status = clps_readl(SYSFLG(port));
@@ -168,7 +163,7 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *re
                return IRQ_HANDLED;
        }
        if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
-               clps711xuart_stop_tx(port, 0);
+               clps711xuart_stop_tx(port);
                return IRQ_HANDLED;
        }
 
@@ -185,7 +180,7 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *re
                uart_write_wakeup(port);
 
        if (uart_circ_empty(xmit))
-               clps711xuart_stop_tx(port, 0);
+               clps711xuart_stop_tx(port);
 
        return IRQ_HANDLED;
 }