mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Geliang Tang <geliangtang@gmail.com>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ide: use setup_timer
Date: Sun,  9 Apr 2017 09:41:32 +0800	[thread overview]
Message-ID: <964230281324b7c18ec70296a8a3cd1caae13cb6.1490602149.git.geliangtang@gmail.com> (raw)
In-Reply-To: <0ff6e139159043e3416b0e5bc89e9aa5399bbb8e.1490601847.git.geliangtang@gmail.com>

Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 drivers/ide/ide-probe.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index a74ae8df..0235625 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1183,9 +1183,7 @@ static void ide_init_port_data(ide_hwif_t *hwif, unsigned int index)
 
 	spin_lock_init(&hwif->lock);
 
-	init_timer(&hwif->timer);
-	hwif->timer.function = &ide_timer_expiry;
-	hwif->timer.data = (unsigned long)hwif;
+	setup_timer(&hwif->timer, &ide_timer_expiry, (unsigned long)hwif);
 
 	init_completion(&hwif->gendev_rel_comp);
 
-- 
2.9.3

  parent reply	other threads:[~2017-04-09  1:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-09  1:41 [PATCH] dmaengine: ioat: " Geliang Tang
2017-04-09  1:41 ` [PATCH] i2c: img-scb: " Geliang Tang
2017-04-16 19:51   ` Wolfram Sang
2017-04-09  1:41 ` Geliang Tang [this message]
2017-05-08 21:37   ` [PATCH] ide: " David Miller
2017-04-09  1:41 ` [PATCH] SGI-XP: " Geliang Tang
2017-04-09 18:04 ` [PATCH] dmaengine: ioat: " Dan Williams
2017-04-24  4:09 ` Vinod Koul

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=964230281324b7c18ec70296a8a3cd1caae13cb6.1490602149.git.geliangtang@gmail.com \
    --to=geliangtang@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-ide@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®