diff options
author | Heiko Stübner <heiko@sntech.de> | 2015-02-24 11:39:25 +0100 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2015-03-06 09:25:13 -0800 |
commit | 2f7bf4af5c8177f6a27d9b67efdeb48f5bdbf821 (patch) | |
tree | 4603115bca32b1344e97b0cece85736a57adeec8 /drivers/clk/clk-divider.c | |
parent | a456fe3d27b1fe502fe3d5fd21cd025e5bf64c22 (diff) | |
download | linux-2f7bf4af5c8177f6a27d9b67efdeb48f5bdbf821.tar.bz2 |
clk: divider: return real rate instead of divider value
Commit bca9690b9426 ("clk: divider: Make generic for usage elsewhere")
returned only the divider value for read-only dividers instead of the
actual rate.
Fixes: bca9690b9426 ("clk: divider: Make generic for usage elsewhere")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Tested-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/clk-divider.c')
-rw-r--r-- | drivers/clk/clk-divider.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index db7f8bce7467..eff8a862eb08 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c @@ -353,7 +353,7 @@ static long clk_divider_round_rate(struct clk_hw *hw, unsigned long rate, bestdiv = readl(divider->reg) >> divider->shift; bestdiv &= div_mask(divider->width); bestdiv = _get_div(divider->table, bestdiv, divider->flags); - return bestdiv; + return DIV_ROUND_UP(*prate, bestdiv); } return divider_round_rate(hw, rate, prate, divider->table, |