diff mbox

[2/4] Input: gameport - use setup_timer

Message ID c0e3e8852152b581e5ae671025ab7b231658bce0.1490951519.git.geliangtang@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Geliang Tang April 9, 2017, 1:39 a.m. UTC
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 drivers/input/gameport/gameport.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
index 092cc41..cedc665 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);
 }
 
 /*