Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1619414 > unrolled thread
| Started by | Geliang Tang <geliangtang@gmail.com> |
|---|---|
| First post | 2017-04-09 03:40 +0200 |
| Last post | 2017-04-09 03:50 +0200 |
| Articles | 4 — 1 participant |
Back to article view | Back to linux.kernel
[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
| From | Geliang Tang <geliangtang@gmail.com> |
|---|---|
| Date | 2017-04-09 03:40 +0200 |
| Subject | [PATCH 1/4] Input: db9 - use setup_timer |
| Message-ID | <tu9ZD-4FS-5@gated-at.bofh.it> |
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
drivers/input/joystick/db9.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c
index da32609..f4ad83e 100644
--- a/drivers/input/joystick/db9.c
+++ b/drivers/input/joystick/db9.c
@@ -609,9 +609,7 @@ static void db9_attach(struct parport *pp)
db9->pd = pd;
db9->mode = mode;
db9->parportno = pp->number;
- init_timer(&db9->timer);
- db9->timer.data = (long) db9;
- db9->timer.function = db9_timer;
+ setup_timer(&db9->timer, db9_timer, (long)db9);
for (i = 0; i < (min(db9_mode->n_pads, DB9_MAX_DEVICES)); i++) {
--
2.9.3
[toc] | [next] | [standalone]
| From | Geliang Tang <geliangtang@gmail.com> |
|---|---|
| Date | 2017-04-09 03:50 +0200 |
| Subject | [PATCH 4/4] Input: turbografx - use setup_timer |
| Message-ID | <tua9j-4Jh-5@gated-at.bofh.it> |
| In reply to | #1619414 |
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
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@gmail.com> |
|---|---|
| Date | 2017-04-09 03:50 +0200 |
| Subject | [PATCH 3/4] Input: locomokbd - use setup_timer |
| Message-ID | <tua9k-4Jh-13@gated-at.bofh.it> |
| In reply to | #1619414 |
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@gmail.com> --- drivers/input/keyboard/locomokbd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c index c94d610..0d74312d 100644 --- a/drivers/input/keyboard/locomokbd.c +++ b/drivers/input/keyboard/locomokbd.c @@ -264,9 +264,8 @@ static int locomokbd_probe(struct locomo_dev *dev) spin_lock_init(&locomokbd->lock); - init_timer(&locomokbd->timer); - locomokbd->timer.function = locomokbd_timer_callback; - locomokbd->timer.data = (unsigned long) locomokbd; + setup_timer(&locomokbd->timer, locomokbd_timer_callback, + (unsigned long)locomokbd); locomokbd->suspend_jiffies = jiffies; -- 2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@gmail.com> |
|---|---|
| Date | 2017-04-09 03:50 +0200 |
| Subject | [PATCH 2/4] Input: gameport - use setup_timer |
| Message-ID | <tua9k-4Jh-11@gated-at.bofh.it> |
| In reply to | #1619414 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web