All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Joe Perches <joe@perches.com>
Cc: Geliang Tang <geliangtang@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] Input: turbografx - use setup_timer
Date: Sun,  9 Apr 2017 09:39:38 +0800	[thread overview]
Message-ID: <d134eb4b021e064bcc70f0287d4f6ac2d576d4c0.1490951519.git.geliangtang@gmail.com> (raw)
In-Reply-To: <f1804ee67d021aa15a44a5e62ed5277c2eab50b5.1490951519.git.geliangtang@gmail.com>
In-Reply-To: <f1804ee67d021aa15a44a5e62ed5277c2eab50b5.1490951519.git.geliangtang@gmail.com>

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

  parent reply	other threads:[~2017-04-09  1:40 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 ` Geliang Tang [this message]
2017-04-11  3:39 ` [PATCH 1/4] Input: db9 " Dmitry Torokhov

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=d134eb4b021e064bcc70f0287d4f6ac2d576d4c0.1490951519.git.geliangtang@gmail.com \
    --to=geliangtang@gmail.com \
    --cc=dmitry.torokhov@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.