diff options
Diffstat (limited to 'drivers/tty/serial/mxs-auart.c')
-rw-r--r-- | drivers/tty/serial/mxs-auart.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index e55615eb34ad..d549fe1fa42a 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c | |||
@@ -364,7 +364,6 @@ out: | |||
364 | 364 | ||
365 | static void mxs_auart_rx_chars(struct mxs_auart_port *s) | 365 | static void mxs_auart_rx_chars(struct mxs_auart_port *s) |
366 | { | 366 | { |
367 | struct tty_struct *tty = s->port.state->port.tty; | ||
368 | u32 stat = 0; | 367 | u32 stat = 0; |
369 | 368 | ||
370 | for (;;) { | 369 | for (;;) { |
@@ -375,7 +374,7 @@ static void mxs_auart_rx_chars(struct mxs_auart_port *s) | |||
375 | } | 374 | } |
376 | 375 | ||
377 | writel(stat, s->port.membase + AUART_STAT); | 376 | writel(stat, s->port.membase + AUART_STAT); |
378 | tty_flip_buffer_push(tty); | 377 | tty_flip_buffer_push(&s->port.state->port); |
379 | } | 378 | } |
380 | 379 | ||
381 | static int mxs_auart_request_port(struct uart_port *u) | 380 | static int mxs_auart_request_port(struct uart_port *u) |
@@ -459,7 +458,7 @@ static int mxs_auart_dma_prep_rx(struct mxs_auart_port *s); | |||
459 | static void dma_rx_callback(void *arg) | 458 | static void dma_rx_callback(void *arg) |
460 | { | 459 | { |
461 | struct mxs_auart_port *s = (struct mxs_auart_port *) arg; | 460 | struct mxs_auart_port *s = (struct mxs_auart_port *) arg; |
462 | struct tty_struct *tty = s->port.state->port.tty; | 461 | struct tty_port *port = &s->port.state->port; |
463 | int count; | 462 | int count; |
464 | u32 stat; | 463 | u32 stat; |
465 | 464 | ||
@@ -470,10 +469,10 @@ static void dma_rx_callback(void *arg) | |||
470 | AUART_STAT_PERR | AUART_STAT_FERR); | 469 | AUART_STAT_PERR | AUART_STAT_FERR); |
471 | 470 | ||
472 | count = stat & AUART_STAT_RXCOUNT_MASK; | 471 | count = stat & AUART_STAT_RXCOUNT_MASK; |
473 | tty_insert_flip_string(tty, s->rx_dma_buf, count); | 472 | tty_insert_flip_string(port, s->rx_dma_buf, count); |
474 | 473 | ||
475 | writel(stat, s->port.membase + AUART_STAT); | 474 | writel(stat, s->port.membase + AUART_STAT); |
476 | tty_flip_buffer_push(tty); | 475 | tty_flip_buffer_push(port); |
477 | 476 | ||
478 | /* start the next DMA for RX. */ | 477 | /* start the next DMA for RX. */ |
479 | mxs_auart_dma_prep_rx(s); | 478 | mxs_auart_dma_prep_rx(s); |
@@ -552,7 +551,7 @@ static int mxs_auart_dma_init(struct mxs_auart_port *s) | |||
552 | return 0; | 551 | return 0; |
553 | 552 | ||
554 | /* We do not get the right DMA channels. */ | 553 | /* We do not get the right DMA channels. */ |
555 | if (s->dma_channel_rx == -1 || s->dma_channel_rx == -1) | 554 | if (s->dma_channel_rx == -1 || s->dma_channel_tx == -1) |
556 | return -EINVAL; | 555 | return -EINVAL; |
557 | 556 | ||
558 | /* init for RX */ | 557 | /* init for RX */ |