mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@gmail.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Geliang Tang <geliangtang@gmail.com>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] i2c: img-scb: use setup_timer
Date: Sun,  9 Apr 2017 09:41:31 +0800	[thread overview]
Message-ID: <0aa459186eb73a97664174c029bc0933c1db5b74.1490602022.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/i2c/busses/i2c-img-scb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c
index db8e8b4..84fb35f 100644
--- a/drivers/i2c/busses/i2c-img-scb.c
+++ b/drivers/i2c/busses/i2c-img-scb.c
@@ -1362,9 +1362,8 @@ static int img_i2c_probe(struct platform_device *pdev)
 	}
 
 	/* Set up the exception check timer */
-	init_timer(&i2c->check_timer);
-	i2c->check_timer.function = img_i2c_check_timer;
-	i2c->check_timer.data = (unsigned long)i2c;
+	setup_timer(&i2c->check_timer, img_i2c_check_timer,
+		    (unsigned long)i2c);
 
 	i2c->bitrate = timings[0].max_bitrate;
 	if (!of_property_read_u32(node, "clock-frequency", &val))
-- 
2.9.3

  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 ` Geliang Tang [this message]
2017-04-16 19:51   ` [PATCH] i2c: img-scb: " Wolfram Sang
2017-04-09  1:41 ` [PATCH] ide: " Geliang Tang
2017-05-08 21:37   ` 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=0aa459186eb73a97664174c029bc0933c1db5b74.1490602022.git.geliangtang@gmail.com \
    --to=geliangtang@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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®