Skip to content

Commit

Permalink
i2c: img-scb: use setup_timer
Browse files Browse the repository at this point in the history
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
  • Loading branch information
Geliang Tang authored and Wolfram Sang committed Apr 16, 2017
1 parent e058e7a commit 879bce2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/i2c/busses/i2c-img-scb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1362,9 +1362,8 @@ static int img_i2c_probe(struct platform_device *pdev)
}

/* Set up the exception check timer */
init_timer(&i2c->check_timer);
i2c->check_timer.function = img_i2c_check_timer;
i2c->check_timer.data = (unsigned long)i2c;
setup_timer(&i2c->check_timer, img_i2c_check_timer,
(unsigned long)i2c);

i2c->bitrate = timings[0].max_bitrate;
if (!of_property_read_u32(node, "clock-frequency", &val))
Expand Down

0 comments on commit 879bce2

Please sign in to comment.