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

* [PATCH 2/4] Input: gameport - use setup_timer
  2017-04-09  1:39 [PATCH 1/4] Input: db9 - use setup_timer Geliang Tang
@ 2017-04-09  1:39 ` Geliang Tang
  2017-04-09  1:39 ` [PATCH 3/4] Input: locomokbd " Geliang Tang
                   ` (2 subsequent siblings)
  3 siblings, 0 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/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

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

* [PATCH 3/4] Input: locomokbd - use setup_timer
  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 ` 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
  3 siblings, 0 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/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

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

* [PATCH 4/4] Input: turbografx - use setup_timer
  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 ` Geliang Tang
  2017-04-11  3:39 ` [PATCH 1/4] Input: db9 " Dmitry Torokhov
  3 siblings, 0 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/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

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

* Re: [PATCH 1/4] Input: db9 - use setup_timer
  2017-04-09  1:39 [PATCH 1/4] Input: db9 - use setup_timer Geliang Tang
                   ` (2 preceding siblings ...)
  2017-04-09  1:39 ` [PATCH 4/4] Input: turbografx " Geliang Tang
@ 2017-04-11  3:39 ` Dmitry Torokhov
  3 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2017-04-11  3:39 UTC (permalink / raw)
  To: Geliang Tang; +Cc: Joe Perches, linux-input, linux-kernel

On Sun, Apr 09, 2017 at 09:39:35AM +0800, Geliang Tang wrote:
> Use setup_timer() instead of init_timer() to simplify the code.
> 
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>

Applied the lot, thank you.

> ---
>  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
> 

-- 
Dmitry

^ permalink raw reply	[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).