Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1619427
| From | Geliang Tang <geliangtang@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/4] Input: turbografx - use setup_timer |
| Date | 2017-04-09 03:50 +0200 |
| Message-ID | <tua9j-4Jh-5@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/joystick/turbografx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c
index 77f575d..a1fdc75 100644
--- a/drivers/input/joystick/turbografx.c
+++ b/drivers/input/joystick/turbografx.c
@@ -200,9 +200,7 @@ static void tgfx_attach(struct parport *pp)
mutex_init(&tgfx->sem);
tgfx->pd = pd;
tgfx->parportno = pp->number;
- init_timer(&tgfx->timer);
- tgfx->timer.data = (long) tgfx;
- tgfx->timer.function = tgfx_timer;
+ setup_timer(&tgfx->timer, tgfx_timer, (long)tgfx);
for (i = 0; i < n_devs; i++) {
if (n_buttons[i] < 1)
--
2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next 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