diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-07-31 03:20:57 +0300 |
---|---|---|
committer | Michael Turquette <mturquette@baylibre.com> | 2015-08-25 02:48:56 +0300 |
commit | 1b14afa64d2ef36f228e9540664586fd7ad67a81 (patch) | |
tree | 4c53c37c12554ae285d1c3decb65f13a507cd160 /drivers/clk/sunxi/clk-factors.c | |
parent | b73d616d5bd0bb94b3fe1374edad05253fe3684f (diff) | |
download | linux-1b14afa64d2ef36f228e9540664586fd7ad67a81.tar.xz |
clk: sunxi: Convert to clk_hw based provider APIs
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: "Emilio López" <emilio@elopez.com.ar>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/sunxi/clk-factors.c')
-rw-r--r-- | drivers/clk/sunxi/clk-factors.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c index b8c3ee5688f4..59428dbd607a 100644 --- a/drivers/clk/sunxi/clk-factors.c +++ b/drivers/clk/sunxi/clk-factors.c @@ -82,20 +82,20 @@ static long clk_factors_round_rate(struct clk_hw *hw, unsigned long rate, static int clk_factors_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { - struct clk *clk = hw->clk, *parent, *best_parent = NULL; + struct clk_hw *parent, *best_parent = NULL; int i, num_parents; unsigned long parent_rate, best = 0, child_rate, best_child_rate = 0; /* find the parent that can help provide the fastest rate <= rate */ num_parents = clk_hw_get_num_parents(hw); for (i = 0; i < num_parents; i++) { - parent = clk_get_parent_by_index(clk, i); + parent = clk_hw_get_parent_by_index(hw, i); if (!parent) continue; if (clk_hw_get_flags(hw) & CLK_SET_RATE_PARENT) - parent_rate = __clk_round_rate(parent, req->rate); + parent_rate = clk_hw_round_rate(parent, req->rate); else - parent_rate = __clk_get_rate(parent); + parent_rate = clk_hw_get_rate(parent); child_rate = clk_factors_round_rate(hw, req->rate, &parent_rate); @@ -110,7 +110,7 @@ static int clk_factors_determine_rate(struct clk_hw *hw, if (!best_parent) return -EINVAL; - req->best_parent_hw = __clk_get_hw(best_parent); + req->best_parent_hw = best_parent; req->best_parent_rate = best; req->rate = best_child_rate; |