diff options
Diffstat (limited to 'drivers/tty/serial/atmel_serial.c')
-rw-r--r-- | drivers/tty/serial/atmel_serial.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 922e85aeb63a..d4a7c241b751 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c | |||
@@ -774,14 +774,14 @@ static void atmel_rx_from_ring(struct uart_port *port) | |||
774 | * uart_start(), which takes the lock. | 774 | * uart_start(), which takes the lock. |
775 | */ | 775 | */ |
776 | spin_unlock(&port->lock); | 776 | spin_unlock(&port->lock); |
777 | tty_flip_buffer_push(port->state->port.tty); | 777 | tty_flip_buffer_push(&port->state->port); |
778 | spin_lock(&port->lock); | 778 | spin_lock(&port->lock); |
779 | } | 779 | } |
780 | 780 | ||
781 | static void atmel_rx_from_dma(struct uart_port *port) | 781 | static void atmel_rx_from_dma(struct uart_port *port) |
782 | { | 782 | { |
783 | struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); | 783 | struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); |
784 | struct tty_struct *tty = port->state->port.tty; | 784 | struct tty_port *tport = &port->state->port; |
785 | struct atmel_dma_buffer *pdc; | 785 | struct atmel_dma_buffer *pdc; |
786 | int rx_idx = atmel_port->pdc_rx_idx; | 786 | int rx_idx = atmel_port->pdc_rx_idx; |
787 | unsigned int head; | 787 | unsigned int head; |
@@ -820,7 +820,8 @@ static void atmel_rx_from_dma(struct uart_port *port) | |||
820 | */ | 820 | */ |
821 | count = head - tail; | 821 | count = head - tail; |
822 | 822 | ||
823 | tty_insert_flip_string(tty, pdc->buf + pdc->ofs, count); | 823 | tty_insert_flip_string(tport, pdc->buf + pdc->ofs, |
824 | count); | ||
824 | 825 | ||
825 | dma_sync_single_for_device(port->dev, pdc->dma_addr, | 826 | dma_sync_single_for_device(port->dev, pdc->dma_addr, |
826 | pdc->dma_size, DMA_FROM_DEVICE); | 827 | pdc->dma_size, DMA_FROM_DEVICE); |
@@ -848,7 +849,7 @@ static void atmel_rx_from_dma(struct uart_port *port) | |||
848 | * uart_start(), which takes the lock. | 849 | * uart_start(), which takes the lock. |
849 | */ | 850 | */ |
850 | spin_unlock(&port->lock); | 851 | spin_unlock(&port->lock); |
851 | tty_flip_buffer_push(tty); | 852 | tty_flip_buffer_push(tport); |
852 | spin_lock(&port->lock); | 853 | spin_lock(&port->lock); |
853 | 854 | ||
854 | UART_PUT_IER(port, ATMEL_US_ENDRX | ATMEL_US_TIMEOUT); | 855 | UART_PUT_IER(port, ATMEL_US_ENDRX | ATMEL_US_TIMEOUT); |