[PATCH 2/4] Input: gameport - use setup_timer

From: Geliang Tang
Date: Sat Apr 08 2017 - 21:40:07 EST


Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>
---
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 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);
}

/*
--
2.9.3