Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1619433
| From | Geliang Tang <geliangtang@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/4] Input: gameport - use setup_timer |
| Date | 2017-04-09 03:50 +0200 |
| Message-ID | <tua9k-4Jh-11@gated-at.bofh.it> (permalink) |
| References | <tu9ZD-4FS-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 --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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/4] Input: db9 - use setup_timer Geliang Tang <geliangtang@gmail.com> - 2017-04-09 03:40 +0200 [PATCH 4/4] Input: turbografx - use setup_timer Geliang Tang <geliangtang@gmail.com> - 2017-04-09 03:50 +0200 [PATCH 3/4] Input: locomokbd - use setup_timer Geliang Tang <geliangtang@gmail.com> - 2017-04-09 03:50 +0200 [PATCH 2/4] Input: gameport - use setup_timer Geliang Tang <geliangtang@gmail.com> - 2017-04-09 03:50 +0200
csiph-web