Skip to content

Commit

Permalink
drivers: tty: pnx8xxx: use setup_timer() helper.
Browse files Browse the repository at this point in the history
    Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Allen Pais authored and Greg Kroah-Hartman committed Oct 3, 2017
1 parent 3056151 commit 9b363c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/tty/serial/pnx8xxx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,8 @@ 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];
setup_timer(&pnx8xxx_ports[i].timer, pnx8xxx_timeout,
(unsigned long)&pnx8xxx_ports[i]);
pnx8xxx_ports[i].port.ops = &pnx8xxx_pops;
}
}
Expand Down

0 comments on commit 9b363c8

Please sign in to comment.