Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1620872 > unrolled thread

Re: [PATCH 1/4] Input: db9 - use setup_timer

Started byDmitry Torokhov <dmitry.torokhov@gmail.com>
First post2017-04-11 05:40 +0200
Last post2017-04-11 05:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/4] Input: db9 - use setup_timer Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-04-11 05:40 +0200

#1620872 — Re: [PATCH 1/4] Input: db9 - use setup_timer

FromDmitry Torokhov <dmitry.torokhov@gmail.com>
Date2017-04-11 05:40 +0200
SubjectRe: [PATCH 1/4] Input: db9 - use setup_timer
Message-ID<tuUOR-1zj-11@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web