diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2019-08-07 10:46:33 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2019-08-27 00:31:39 +0200 |
commit | 8d18f6fc75c86b2efa5865655a0630a083c8a1fd (patch) | |
tree | b606747c82da762713b265676583db87379c32e6 /drivers/clocksource/renesas-ostm.c | |
parent | 24e8a5db8ae46bf021d3b4063c005f443282ab4f (diff) |
clocksource/drivers/renesas-ostm: Use DIV_ROUND_CLOSEST() helper
Use the DIV_ROUND_CLOSEST() helper instead of open-coding the same
operation.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource/renesas-ostm.c')
-rw-r--r-- | drivers/clocksource/renesas-ostm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/renesas-ostm.c b/drivers/clocksource/renesas-ostm.c index 61d5f3b539ce..37c39b901bb1 100644 --- a/drivers/clocksource/renesas-ostm.c +++ b/drivers/clocksource/renesas-ostm.c @@ -221,7 +221,7 @@ static int __init ostm_init(struct device_node *np) } rate = clk_get_rate(ostm_clk); - ostm->ticks_per_jiffy = (rate + HZ / 2) / HZ; + ostm->ticks_per_jiffy = DIV_ROUND_CLOSEST(rate, HZ); /* * First probed device will be used as system clocksource. Any |