]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Input: gameport - use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Tue, 11 Apr 2017 03:37:53 +0000 (20:37 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 11 Apr 2017 03:41:39 +0000 (20:41 -0700)
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/gameport/gameport.c

index 092cc4188b57a6c5363475e5195e6febbedbf692..cedc665364cd6e872ee8a86795b0de19913b8a28 100644 (file)
@@ -542,9 +542,8 @@ static void gameport_init_port(struct gameport *gameport)
 
        INIT_LIST_HEAD(&gameport->node);
        spin_lock_init(&gameport->timer_lock);
-       init_timer(&gameport->poll_timer);
-       gameport->poll_timer.function = gameport_run_poll_handler;
-       gameport->poll_timer.data = (unsigned long)gameport;
+       setup_timer(&gameport->poll_timer, gameport_run_poll_handler,
+                   (unsigned long)gameport);
 }
 
 /*