drivers: tty: sn_console: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Fri, 22 Sep 2017 08:26:51 +0000 (13:56 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Oct 2017 18:28:36 +0000 (20:28 +0200)
        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>
drivers/tty/serial/sn_console.c

index 9e0e658..81d506d 100644 (file)
@@ -687,9 +687,7 @@ static void __init sn_sal_switch_to_asynch(struct sn_cons_port *port)
         * timer to poll for input and push data from the console
         * buffer.
         */
-       init_timer(&port->sc_timer);
-       port->sc_timer.function = sn_sal_timer_poll;
-       port->sc_timer.data = (unsigned long)port;
+       setup_timer(&port->sc_timer, sn_sal_timer_poll, (unsigned long)port);
 
        if (IS_RUNNING_ON_SIMULATOR())
                port->sc_interrupt_timeout = 6;