diff options
Diffstat (limited to 'drivers/tty/serial/pnx8xxx_uart.c')
-rw-r--r-- | drivers/tty/serial/pnx8xxx_uart.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/tty/serial/pnx8xxx_uart.c b/drivers/tty/serial/pnx8xxx_uart.c index dab2668d3879..223a9499104e 100644 --- a/drivers/tty/serial/pnx8xxx_uart.c +++ b/drivers/tty/serial/pnx8xxx_uart.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * UART driver for PNX8XXX SoCs * @@ -7,11 +8,6 @@ * * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o. * Copyright (C) 2000 Deep Blue Solutions Ltd. - * - * This file is licensed under the terms of the GNU General Public License - * version 2. This program is licensed "as is" without any warranty of - * any kind, whether express or implied. - * */ #if defined(CONFIG_SERIAL_PNX8XXX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) @@ -107,9 +103,9 @@ static void pnx8xxx_mctrl_check(struct pnx8xxx_port *sport) * This is our per-port timeout handler, for checking the * modem status signals. */ -static void pnx8xxx_timeout(unsigned long data) +static void pnx8xxx_timeout(struct timer_list *t) { - struct pnx8xxx_port *sport = (struct pnx8xxx_port *)data; + struct pnx8xxx_port *sport = from_timer(sport, t, timer); unsigned long flags; if (sport->port.state) { @@ -666,9 +662,7 @@ static void __init pnx8xxx_init_ports(void) first = 0; for (i = 0; i < NR_PORTS; i++) { - init_timer(&pnx8xxx_ports[i].timer); - pnx8xxx_ports[i].timer.function = pnx8xxx_timeout; - pnx8xxx_ports[i].timer.data = (unsigned long)&pnx8xxx_ports[i]; + timer_setup(&pnx8xxx_ports[i].timer, pnx8xxx_timeout, 0); pnx8xxx_ports[i].port.ops = &pnx8xxx_pops; } } |