Skip to content

Commit

Permalink
clk: divider: return real rate instead of divider value
Browse files Browse the repository at this point in the history
Commit bca9690 ("clk: divider: Make generic for usage elsewhere")
returned only the divider value for read-only dividers instead of the
actual rate.

Fixes: bca9690 ("clk: divider: Make generic for usage elsewhere")
Signed-off-by: Heiko Stuebner <[email protected]>
Reviewed-by: James Hogan <[email protected]>
Tested-by: James Hogan <[email protected]>
Acked-by: Stephen Boyd <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
  • Loading branch information
mmind authored and Michael Turquette committed Mar 6, 2015
1 parent a456fe3 commit 2f7bf4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/clk-divider.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2f7bf4a

Please sign in to comment.