diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-07-30 17:20:57 -0700 |
---|---|---|
committer | Michael Turquette <mturquette@baylibre.com> | 2015-08-24 16:48:47 -0700 |
commit | d0979335c329bad3b924b9d74fd0b86d57815c8f (patch) | |
tree | eafeee94ca0b11f32895f021b197f66239b4e6a3 /drivers/clk/at91/clk-programmable.c | |
parent | 617b8272a63c9f60bd4b1e33d56318402b0b84be (diff) |
clk: at91: 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.
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/at91/clk-programmable.c')
-rw-r--r-- | drivers/clk/at91/clk-programmable.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/clk/at91/clk-programmable.c b/drivers/clk/at91/clk-programmable.c index 42ec812404ab..14b270b85fec 100644 --- a/drivers/clk/at91/clk-programmable.c +++ b/drivers/clk/at91/clk-programmable.c @@ -57,7 +57,7 @@ static unsigned long clk_programmable_recalc_rate(struct clk_hw *hw, static int clk_programmable_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { - struct clk *parent = NULL; + struct clk_hw *parent; long best_rate = -EINVAL; unsigned long parent_rate; unsigned long tmp_rate; @@ -65,11 +65,11 @@ static int clk_programmable_determine_rate(struct clk_hw *hw, int i; for (i = 0; i < clk_hw_get_num_parents(hw); i++) { - parent = clk_get_parent_by_index(hw->clk, i); + parent = clk_hw_get_parent_by_index(hw, i); if (!parent) continue; - parent_rate = __clk_get_rate(parent); + parent_rate = clk_hw_get_rate(parent); for (shift = 0; shift < PROG_PRES_MASK; shift++) { tmp_rate = parent_rate >> shift; if (tmp_rate <= req->rate) @@ -83,7 +83,7 @@ static int clk_programmable_determine_rate(struct clk_hw *hw, (req->rate - tmp_rate) < (req->rate - best_rate)) { best_rate = tmp_rate; req->best_parent_rate = parent_rate; - req->best_parent_hw = __clk_get_hw(parent); + req->best_parent_hw = parent; } if (!best_rate) |