diff options
Diffstat (limited to 'drivers/tty/serial/bfin_uart.c')
-rw-r--r-- | drivers/tty/serial/bfin_uart.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c index 293ecbb00684..4755fa696321 100644 --- a/drivers/tty/serial/bfin_uart.c +++ b/drivers/tty/serial/bfin_uart.c | |||
@@ -1,11 +1,10 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0+ | ||
1 | /* | 2 | /* |
2 | * Blackfin On-Chip Serial Driver | 3 | * Blackfin On-Chip Serial Driver |
3 | * | 4 | * |
4 | * Copyright 2006-2011 Analog Devices Inc. | 5 | * Copyright 2006-2011 Analog Devices Inc. |
5 | * | 6 | * |
6 | * Enter bugs at http://blackfin.uclinux.org/ | 7 | * Enter bugs at http://blackfin.uclinux.org/ |
7 | * | ||
8 | * Licensed under the GPL-2 or later. | ||
9 | */ | 8 | */ |
10 | 9 | ||
11 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) | 10 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) |
@@ -456,8 +455,9 @@ static void bfin_serial_dma_rx_chars(struct bfin_serial_port *uart) | |||
456 | tty_flip_buffer_push(&uart->port.state->port); | 455 | tty_flip_buffer_push(&uart->port.state->port); |
457 | } | 456 | } |
458 | 457 | ||
459 | void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart) | 458 | void bfin_serial_rx_dma_timeout(struct timer_list *t) |
460 | { | 459 | { |
460 | struct bfin_serial_port *uart = from_timer(uart, t, rx_dma_timer); | ||
461 | int x_pos, pos; | 461 | int x_pos, pos; |
462 | unsigned long flags; | 462 | unsigned long flags; |
463 | 463 | ||
@@ -624,8 +624,6 @@ static int bfin_serial_startup(struct uart_port *port) | |||
624 | set_dma_start_addr(uart->rx_dma_channel, (unsigned long)uart->rx_dma_buf.buf); | 624 | set_dma_start_addr(uart->rx_dma_channel, (unsigned long)uart->rx_dma_buf.buf); |
625 | enable_dma(uart->rx_dma_channel); | 625 | enable_dma(uart->rx_dma_channel); |
626 | 626 | ||
627 | uart->rx_dma_timer.data = (unsigned long)(uart); | ||
628 | uart->rx_dma_timer.function = (void *)bfin_serial_rx_dma_timeout; | ||
629 | uart->rx_dma_timer.expires = jiffies + DMA_RX_FLUSH_JIFFIES; | 627 | uart->rx_dma_timer.expires = jiffies + DMA_RX_FLUSH_JIFFIES; |
630 | add_timer(&(uart->rx_dma_timer)); | 628 | add_timer(&(uart->rx_dma_timer)); |
631 | #else | 629 | #else |
@@ -1316,7 +1314,7 @@ static int bfin_serial_probe(struct platform_device *pdev) | |||
1316 | } | 1314 | } |
1317 | uart->rx_dma_channel = res->start; | 1315 | uart->rx_dma_channel = res->start; |
1318 | 1316 | ||
1319 | init_timer(&(uart->rx_dma_timer)); | 1317 | timer_setup(&uart->rx_dma_timer, bfin_serial_rx_dma_timeout, 0); |
1320 | #endif | 1318 | #endif |
1321 | 1319 | ||
1322 | #if defined(SERIAL_BFIN_CTSRTS) || \ | 1320 | #if defined(SERIAL_BFIN_CTSRTS) || \ |