diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-30 05:44:13 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-30 05:44:13 +0400 |
commit | 4ceedcf8151c1b91ad45a2603d4473c0ad3ac03c (patch) | |
tree | 3282387ff7ac6fd108a119417bd1f93c018fed1a /drivers/tty/serial/pch_uart.c | |
parent | 058555739166561b97313123521574f0a9b2c9d7 (diff) | |
parent | 15c03dd4859ab16f9212238f29dd315654aa94f6 (diff) | |
download | linux-4ceedcf8151c1b91ad45a2603d4473c0ad3ac03c.tar.xz |
Merge 3.12-rc3 into tty-next
We want the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/pch_uart.c')
-rw-r--r-- | drivers/tty/serial/pch_uart.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index e0fbf87478b9..87f25def0b41 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c @@ -667,30 +667,21 @@ static int pop_tx_x(struct eg20t_port *priv, unsigned char *buf) static int dma_push_rx(struct eg20t_port *priv, int size) { - struct tty_struct *tty; int room; struct uart_port *port = &priv->port; struct tty_port *tport = &port->state->port; - port = &priv->port; - tty = tty_port_tty_get(tport); - if (!tty) { - dev_dbg(priv->port.dev, "%s:tty is busy now", __func__); - return 0; - } - room = tty_buffer_request_room(tport, size); if (room < size) dev_warn(port->dev, "Rx overrun: dropping %u bytes\n", size - room); if (!room) - return room; + return 0; tty_insert_flip_string(tport, sg_virt(&priv->sg_rx), size); port->icount.rx += room; - tty_kref_put(tty); return room; } @@ -1098,6 +1089,8 @@ static void pch_uart_err_ir(struct eg20t_port *priv, unsigned int lsr) if (tty == NULL) { for (i = 0; error_msg[i] != NULL; i++) dev_err(&priv->pdev->dev, error_msg[i]); + } else { + tty_kref_put(tty); } } |