From d8f2bed04c9925dc6fc8c1b60c145a044869a82f Mon Sep 17 00:00:00 2001 From: Geliang Tang Date: Mon, 10 Apr 2017 20:37:53 -0700 Subject: [PATCH] Input: gameport - use setup_timer Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang Signed-off-by: Dmitry Torokhov --- drivers/input/gameport/gameport.c | 5 ++--- 1 file 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); } /* -- 2.39.5