Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d18f6fc authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Daniel Lezcano
Browse files

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: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 24e8a5db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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