[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <c0e3e8852152b581e5ae671025ab7b231658bce0.1490951519.git.geliangtang@gmail.com>
Date: Sun, 9 Apr 2017 09:39:36 +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 2/4] Input: gameport - use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@...il.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
Powered by blists - more mailing lists