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


Groups > linux.kernel > #1251938 > unrolled thread

[PATCH] i2c: busses: Use setup_timer

Started byMuhammad Falak R Wani <falakreyaz@gmail.com>
First post2015-10-20 20:20 +0200
Last post2015-10-25 16:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] i2c: busses: Use setup_timer Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-10-20 20:20 +0200
    Re: [PATCH] i2c: busses: Use setup_timer Wolfram Sang <wsa@the-dreams.de> - 2015-10-25 16:00 +0100

#1251938 — [PATCH] i2c: busses: Use setup_timer

FromMuhammad Falak R Wani <falakreyaz@gmail.com>
Date2015-10-20 20:20 +0200
Subject[PATCH] i2c: busses: Use setup_timer
Message-ID<qlJFT-39I-13@gated-at.bofh.it>
Use timer API function setup_timer instead of init_timer to
initialize the timer.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
 drivers/i2c/busses/i2c-pnx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index e814a36..cdbf632 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -659,9 +659,8 @@ static int i2c_pnx_probe(struct platform_device *pdev)
 	if (IS_ERR(alg_data->clk))
 		return PTR_ERR(alg_data->clk);
 
-	init_timer(&alg_data->mif.timer);
-	alg_data->mif.timer.function = i2c_pnx_timeout;
-	alg_data->mif.timer.data = (unsigned long)alg_data;
+	setup_timer(&alg_data->mif.timer, i2c_pnx_timeout,
+			(unsigned long)alg_data);
 
 	snprintf(alg_data->adapter.name, sizeof(alg_data->adapter.name),
 		 "%s", pdev->name);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1255433

FromWolfram Sang <wsa@the-dreams.de>
Date2015-10-25 16:00 +0100
Message-ID<qnuW6-4fF-37@gated-at.bofh.it>
In reply to#1251938

[Multipart message — attachments visible in raw view] — view raw

On Tue, Oct 20, 2015 at 11:47:19PM +0530, Muhammad Falak R Wani wrote:
> Use timer API function setup_timer instead of init_timer to
> initialize the timer.
> 
> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>

Please note that the proper prefix in the subject would be "i2c: pnx: "

Fixed this and applied to for-next, thanks!

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web