summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2013-01-16 14:08:13 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-16 07:36:10 -0800
commit6f3fe3b1027bf50c0a0859e5c9ee93b174b95543 (patch)
treeff3527012e3512494f3cd79bdb112fe96fcb5cdb /drivers/tty
parent852e4a8152b427c3f318bb0e1b5e938d64dcdc32 (diff)
serial: 8250_dma: Switch to using tty_port
The tty buffer functions are converted to using tty_port structure instead of struct tty, so we must do the same. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_dma.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index 95516a15a441..02333fc17f41 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -43,8 +43,9 @@ static void __dma_rx_complete(void *param)
{
struct uart_8250_port *p = param;
struct uart_8250_dma *dma = p->dma;
- struct tty_struct *tty = p->port.state->port.tty;
+ struct tty_port *tty_port = &p->port.state->port;
struct dma_tx_state state;
+ int count;
dma_sync_single_for_cpu(dma->rxchan->device->dev, dma->rx_addr,
dma->rx_size, DMA_FROM_DEVICE);
@@ -52,10 +53,12 @@ static void __dma_rx_complete(void *param)
dmaengine_tx_status(dma->rxchan, dma->rx_cookie, &state);
dmaengine_terminate_all(dma->rxchan);
- tty_insert_flip_string(tty, dma->rx_buf, dma->rx_size - state.residue);
- p->port.icount.rx += dma->rx_size - state.residue;
+ count = dma->rx_size - state.residue;
- tty_flip_buffer_push(tty);
+ tty_insert_flip_string(tty_port, dma->rx_buf, count);
+ p->port.icount.rx += count;
+
+ tty_flip_buffer_push(tty_port);
}
int serial8250_tx_dma(struct uart_8250_port *p)