TTY: switch tty_schedule_flip
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / tty / serial / lpc32xx_hs.c
index c8448e6f52e580b662d273fb56e8555b31f1e4bb..c01b58f3729c2666127f7971ab6202e745335450 100644 (file)
@@ -323,7 +323,6 @@ static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id)
 {
        struct uart_port *port = dev_id;
        struct tty_port *port = &port->state->port;
-       struct tty_struct *tty = tty_port_tty_get(tport);
        u32 status;
 
        spin_lock(&port->lock);
@@ -348,9 +347,7 @@ static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id)
                       LPC32XX_HSUART_IIR(port->membase));
                port->icount.overrun++;
                tty_insert_flip_char(tport, 0, TTY_OVERRUN);
-               if (tty) {
-                       tty_schedule_flip(tty);
-               }
+               tty_schedule_flip(tport);
        }
 
        /* Data received? */
@@ -366,7 +363,6 @@ static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id)
        }
 
        spin_unlock(&port->lock);
-       tty_kref_put(tty);
 
        return IRQ_HANDLED;
 }