aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/amba-pl011.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/amba-pl011.c')
-rw-r--r--drivers/tty/serial/amba-pl011.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 7fca4022a8b2..e1257d17f5f0 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -698,7 +698,8 @@ static void pl011_dma_rx_chars(struct uart_amba_port *uap,
698 u32 pending, bool use_buf_b, 698 u32 pending, bool use_buf_b,
699 bool readfifo) 699 bool readfifo)
700{ 700{
701 struct tty_struct *tty = uap->port.state->port.tty; 701 struct tty_port *port = &uap->port.state->port;
702 struct tty_struct *tty = port->tty;
702 struct pl011_sgbuf *sgbuf = use_buf_b ? 703 struct pl011_sgbuf *sgbuf = use_buf_b ?
703 &uap->dmarx.sgbuf_b : &uap->dmarx.sgbuf_a; 704 &uap->dmarx.sgbuf_b : &uap->dmarx.sgbuf_a;
704 struct device *dev = uap->dmarx.chan->device->dev; 705 struct device *dev = uap->dmarx.chan->device->dev;
@@ -715,8 +716,7 @@ static void pl011_dma_rx_chars(struct uart_amba_port *uap,
715 * Note that tty_insert_flip_buf() tries to take as many chars 716 * Note that tty_insert_flip_buf() tries to take as many chars
716 * as it can. 717 * as it can.
717 */ 718 */
718 dma_count = tty_insert_flip_string(uap->port.state->port.tty, 719 dma_count = tty_insert_flip_string(port, sgbuf->buf, pending);
719 sgbuf->buf, pending);
720 720
721 /* Return buffer to device */ 721 /* Return buffer to device */
722 dma_sync_sg_for_device(dev, &sgbuf->sg, 1, DMA_FROM_DEVICE); 722 dma_sync_sg_for_device(dev, &sgbuf->sg, 1, DMA_FROM_DEVICE);