clk: scmi: Fix the rounding of clock rate
authorAmit Daniel Kachhap <amit.kachhap@arm.com>
Tue, 31 Jul 2018 05:55:55 +0000 (11:25 +0530)
committerStephen Boyd <sboyd@kernel.org>
Thu, 2 Aug 2018 20:43:48 +0000 (13:43 -0700)
commit7a8655e19bdb3be43f6a3b4768c9b0928a2585fc
tree7e3908714334fce2060733dcfdc615896a870c90
parentce397d215ccd07b8ae3f71db689aedb85d56ab40
clk: scmi: Fix the rounding of clock rate

This fix rounds the clock rate properly by using quotient and not
remainder in the calculation. This issue was found while testing HDMI
in the Juno platform.

Fixes: 6d6a1d82eaef7 ("clk: add support for clocks provided by SCMI")
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-scmi.c