clk: divider: Fix best div calculation for power-of-two and table dividers
authorMaxime COQUELIN <maxime.coquelin@st.com>
Wed, 29 Jan 2014 16:24:06 +0000 (17:24 +0100)
committerMike Turquette <mturquette@linaro.org>
Wed, 30 Apr 2014 18:44:00 +0000 (11:44 -0700)
commitdd23c2cd38da2c64af381b19795d2c4f115e8ecb
tree285ce925cb3c9a99720f34b40e42f7e70972d05e
parente813d49d2a477e3b64a9ff32ca7db5737d36cd91
clk: divider: Fix best div calculation for power-of-two and table dividers

The divider returned by clk_divider_bestdiv() is likely to be invalid in case
of power-of-two and table dividers when CLK_SET_RATE_PARENT flag isn't set.

Fixes boot on STiH416 platform.

Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
[mturquette@linaro.org: trivial merge conflict & updated changelog]
drivers/clk/clk-divider.c