From: Geert Uytterhoeven Date: Wed, 7 Aug 2019 08:46:33 +0000 (+0200) Subject: clocksource/drivers/renesas-ostm: Use DIV_ROUND_CLOSEST() helper X-Git-Tag: v5.4-rc1~159^2~46^2~10 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=8d18f6fc75c86b2efa5865655a0630a083c8a1fd;p=linux.git 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 Reviewed-by: Simon Horman Signed-off-by: Daniel Lezcano --- 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