[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <f1804ee67d021aa15a44a5e62ed5277c2eab50b5.1490951519.git.geliangtang@gmail.com>
Date: Sun, 9 Apr 2017 09:39:35 +0800
From: Geliang Tang <geliangtang@...il.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Joe Perches <joe@...ches.com>
Cc: Geliang Tang <geliangtang@...il.com>, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/4] Input: db9 - use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@...il.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
Powered by blists - more mailing lists