i2c: pnx: Use setup_timer instead of open coding it
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Tue, 20 Oct 2015 18:17:19 +0000 (23:47 +0530)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 25 Oct 2015 15:01:33 +0000 (16:01 +0100)
Use timer API function setup_timer instead of init_timer to
initialize the timer.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-pnx.c

index e814a36d9b78f26436cd8cf1745dd2aaa3b36db8..cdbf6320cb909ef8169792b92faea3b005c232fb 100644 (file)
@@ -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);