Commit 879bce22 authored by Geliang Tang's avatar Geliang Tang Committed by Wolfram Sang

i2c: img-scb: use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent e058e7a4
...@@ -1362,9 +1362,8 @@ static int img_i2c_probe(struct platform_device *pdev) ...@@ -1362,9 +1362,8 @@ static int img_i2c_probe(struct platform_device *pdev)
} }
/* Set up the exception check timer */ /* Set up the exception check timer */
init_timer(&i2c->check_timer); setup_timer(&i2c->check_timer, img_i2c_check_timer,
i2c->check_timer.function = img_i2c_check_timer; (unsigned long)i2c);
i2c->check_timer.data = (unsigned long)i2c;
i2c->bitrate = timings[0].max_bitrate; i2c->bitrate = timings[0].max_bitrate;
if (!of_property_read_u32(node, "clock-frequency", &val)) if (!of_property_read_u32(node, "clock-frequency", &val))
......
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