Skip to contentSkip to conversation

i2c: busses: Use setup_timer

PATCH In review Muhammad Falak R Wani 2 participants 2 messages Oct 20, 2015 – Oct 25, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: busses: Use setup_timer

Use timer API function setup_timer instead of init_timer to initialize the timer.

---
 drivers/i2c/busses/i2c-pnx.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/i2c/busses/i2c-pnx.c +2 -3
index e814a36..cdbf632 100644
@@ -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);
Signature · 1 line
1.9.1
#1 lore raw
Quoted 4 lines · Muhammad Falak R Wani

Use timer API function setup_timer instead of init_timer to initialize the timer.

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

Fixed this and applied to for-next, thanks!