diff options
-rw-r--r-- | drivers/tty/serial/altera_uart.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c index 3e4b717..a0360e6 100644 --- a/drivers/tty/serial/altera_uart.c +++ b/drivers/tty/serial/altera_uart.c @@ -288,10 +288,10 @@ static irqreturn_t altera_uart_interrupt(int irq, void *data) return IRQ_RETVAL(isr); } -static void altera_uart_timer(unsigned long data) +static void altera_uart_timer(struct timer_list *t) { - struct uart_port *port = (void *)data; - struct altera_uart *pp = container_of(port, struct altera_uart, port); + struct altera_uart *pp = from_timer(pp, t, tmr); + struct uart_port *port = &pp->port; altera_uart_interrupt(0, port); mod_timer(&pp->tmr, jiffies + uart_poll_timeout(port)); @@ -314,7 +314,7 @@ static int altera_uart_startup(struct uart_port *port) int ret; if (!port->irq) { - setup_timer(&pp->tmr, altera_uart_timer, (unsigned long)port); + timer_setup(&pp->tmr, altera_uart_timer, 0); mod_timer(&pp->tmr, jiffies + uart_poll_timeout(port)); return 0; } |