Commit 43e9f2aa authored by Muhammad Falak R Wani's avatar Muhammad Falak R Wani Committed by Wolfram Sang

i2c: pnx: Use setup_timer instead of open coding it

Use timer API function setup_timer instead of init_timer to
initialize the timer.
Signed-off-by: default avatarMuhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 8eb5c87a
...@@ -659,9 +659,8 @@ static int i2c_pnx_probe(struct platform_device *pdev) ...@@ -659,9 +659,8 @@ static int i2c_pnx_probe(struct platform_device *pdev)
if (IS_ERR(alg_data->clk)) if (IS_ERR(alg_data->clk))
return PTR_ERR(alg_data->clk); return PTR_ERR(alg_data->clk);
init_timer(&alg_data->mif.timer); setup_timer(&alg_data->mif.timer, i2c_pnx_timeout,
alg_data->mif.timer.function = i2c_pnx_timeout; (unsigned long)alg_data);
alg_data->mif.timer.data = (unsigned long)alg_data;
snprintf(alg_data->adapter.name, sizeof(alg_data->adapter.name), snprintf(alg_data->adapter.name, sizeof(alg_data->adapter.name),
"%s", pdev->name); "%s", pdev->name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment