linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] Input: db9 - use setup_timer
@ 2017-04-09  1:39 Geliang Tang
  2017-04-09  1:39 ` [PATCH 2/4] Input: gameport " Geliang Tang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Geliang Tang @ 2017-04-09  1:39 UTC (permalink / raw)
  To: Dmitry Torokhov, Joe Perches; +Cc: Geliang Tang, linux-input, linux-kernel

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-11  3:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-09  1:39 [PATCH 1/4] Input: db9 - use setup_timer Geliang Tang
2017-04-09  1:39 ` [PATCH 2/4] Input: gameport " Geliang Tang
2017-04-09  1:39 ` [PATCH 3/4] Input: locomokbd " Geliang Tang
2017-04-09  1:39 ` [PATCH 4/4] Input: turbografx " Geliang Tang
2017-04-11  3:39 ` [PATCH 1/4] Input: db9 " Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).