From: Muhammad Falak R Wani Date: Tue, 20 Oct 2015 18:17:19 +0000 (+0530) Subject: i2c: pnx: Use setup_timer instead of open coding it X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=43e9f2aa7788cc60eb11fe3cb4fb6f0b63c35de6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Muhammad Falak R Wani Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index e814a36d9b78..cdbf6320cb90 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);