summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-04-10 20:37:53 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-04-10 20:41:39 -0700
commitd8f2bed04c9925dc6fc8c1b60c145a044869a82f (patch)
treed61abeaab670bc5284d5f36a66db724b4bdcbfbc
parentc9a9b72f34bf67a49743b26ab1f94c1349a389ad (diff)
Input: gameport - use setup_timer
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>
-rw-r--r--drivers/input/gameport/gameport.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
index 092cc4188b57..cedc665364cd 100644
--- a/drivers/input/gameport/gameport.c
+++ b/drivers/input/gameport/gameport.c
@@ -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);
}
/*