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


Groups > linux.kernel > #1619428 > unrolled thread

[PATCH] i2c: img-scb: use setup_timer

Started byGeliang Tang <geliangtang@gmail.com>
First post2017-04-09 03:50 +0200
Last post2017-04-09 03:50 +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

  [PATCH] i2c: img-scb: use setup_timer Geliang Tang <geliangtang@gmail.com> - 2017-04-09 03:50 +0200

#1619428 — [PATCH] i2c: img-scb: use setup_timer

FromGeliang Tang <geliangtang@gmail.com>
Date2017-04-09 03:50 +0200
Subject[PATCH] i2c: img-scb: use setup_timer
Message-ID<tua9j-4Jh-7@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web