diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2014-12-02 08:54:22 +0100 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2014-12-03 16:21:37 -0800 |
commit | 646cafc6aa4d6004d189de1cdc267ab562069ba9 (patch) | |
tree | 6d2f85aecfe37696c0930b1dce17722e863cc804 /drivers/clk/sunxi/clk-sun6i-ar100.c | |
parent | 61c7cddfad266ebb86176723f9c679f25cf705fe (diff) | |
download | linux-stable-646cafc6aa4d6004d189de1cdc267ab562069ba9.tar.gz linux-stable-646cafc6aa4d6004d189de1cdc267ab562069ba9.tar.bz2 linux-stable-646cafc6aa4d6004d189de1cdc267ab562069ba9.zip |
clk: Change clk_ops->determine_rate to return a clk_hw as the best parent
This is in preparation for clock providers to not have to deal with struct clk.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/sunxi/clk-sun6i-ar100.c')
-rw-r--r-- | drivers/clk/sunxi/clk-sun6i-ar100.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/sunxi/clk-sun6i-ar100.c b/drivers/clk/sunxi/clk-sun6i-ar100.c index acca53290be2..3d282fb8f85c 100644 --- a/drivers/clk/sunxi/clk-sun6i-ar100.c +++ b/drivers/clk/sunxi/clk-sun6i-ar100.c @@ -46,7 +46,7 @@ static unsigned long ar100_recalc_rate(struct clk_hw *hw, static long ar100_determine_rate(struct clk_hw *hw, unsigned long rate, unsigned long *best_parent_rate, - struct clk **best_parent_clk) + struct clk_hw **best_parent_clk) { int nparents = __clk_get_num_parents(hw->clk); long best_rate = -EINVAL; @@ -100,7 +100,7 @@ static long ar100_determine_rate(struct clk_hw *hw, unsigned long rate, tmp_rate = (parent_rate >> shift) / div; if (!*best_parent_clk || tmp_rate > best_rate) { - *best_parent_clk = parent; + *best_parent_clk = __clk_get_hw(parent); *best_parent_rate = parent_rate; best_rate = tmp_rate; } |