All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Geliang Tang <geliangtang@gmail.com>
Cc: Joe Perches <joe@perches.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] Input: db9 - use setup_timer
Date: Mon, 10 Apr 2017 20:39:05 -0700	[thread overview]
Message-ID: <20170411033905.GC4346@dtor-ws> (raw)
In-Reply-To: <f1804ee67d021aa15a44a5e62ed5277c2eab50b5.1490951519.git.geliangtang@gmail.com>

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

      parent reply	other threads:[~2017-04-11  3:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170411033905.GC4346@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=geliangtang@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.