aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty/serial/efm32-uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/efm32-uart.c')
-rw-r--r--drivers/tty/serial/efm32-uart.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/tty/serial/efm32-uart.c b/drivers/tty/serial/efm32-uart.c
index bdf67b0cb8b..de14bd7dce1 100644
--- a/drivers/tty/serial/efm32-uart.c
+++ b/drivers/tty/serial/efm32-uart.c
@@ -249,12 +249,9 @@ static irqreturn_t efm32_uart_rxirq(int irq, void *data)
int handled = IRQ_NONE;
struct uart_port *port = &efm_port->port;
struct tty_port *tport = &port->state->port;
- struct tty_struct *tty;
spin_lock(&port->lock);
- tty = tty_kref_get(tport->tty);
-
if (irqflag & UARTn_IF_RXDATAV) {
efm32_uart_write32(efm_port, UARTn_IF_RXDATAV, UARTn_IFC);
efm32_uart_rx_chars(efm_port);
@@ -270,10 +267,7 @@ static irqreturn_t efm32_uart_rxirq(int irq, void *data)
handled = IRQ_HANDLED;
}
- if (tty) {
- tty_flip_buffer_push(tty);
- tty_kref_put(tty);
- }
+ tty_flip_buffer_push(tport);
spin_unlock(&port->lock);