summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorMuhammad Falak R Wani <falakreyaz@gmail.com>2015-10-20 20:17:19 +0200
committerWolfram Sang <wsa@the-dreams.de>2015-10-25 16:01:33 +0100
commit43e9f2aa7788cc60eb11fe3cb4fb6f0b63c35de6 (patch)
treeb6addfecc042cbb310564c690da4a07b1710d300 /drivers/i2c
parenti2c: add ACPI support for I2C mux ports (diff)
downloadlinux-43e9f2aa7788cc60eb11fe3cb4fb6f0b63c35de6.tar.xz
linux-43e9f2aa7788cc60eb11fe3cb4fb6f0b63c35de6.zip
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 <falakreyaz@gmail.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-pnx.c5
1 files changed, 2 insertions, 3 deletions
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);