clk: sirf: Convert to clk_hw based provider APIs
authorStephen Boyd <sboyd@codeaurora.org>
Fri, 31 Jul 2015 00:20:57 +0000 (17:20 -0700)
committerMichael Turquette <mturquette@baylibre.com>
Mon, 24 Aug 2015 23:48:54 +0000 (16:48 -0700)
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.

Cc: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/sirf/clk-common.c

index 2f64d4beeb527567368170ef93eb5e2b58a23d1b..77e1e2491689b9c37e943c43e8fabf5778a561aa 100644 (file)
@@ -167,10 +167,10 @@ static long cpu_clk_round_rate(struct clk_hw *hw, unsigned long rate,
         * SiRF SoC has not cpu clock control,
         * So bypass to it's parent pll.
         */
-       struct clk *parent_clk = clk_get_parent(hw->clk);
-       struct clk *pll_parent_clk = clk_get_parent(parent_clk);
-       unsigned long pll_parent_rate = clk_get_rate(pll_parent_clk);
-       return pll_clk_round_rate(__clk_get_hw(parent_clk), rate, &pll_parent_rate);
+       struct clk_hw *parent_clk = clk_hw_get_parent(hw);
+       struct clk_hw *pll_parent_clk = clk_hw_get_parent(parent_clk);
+       unsigned long pll_parent_rate = clk_hw_get_rate(pll_parent_clk);
+       return pll_clk_round_rate(parent_clk, rate, &pll_parent_rate);
 }
 
 static unsigned long cpu_clk_recalc_rate(struct clk_hw *hw,
@@ -180,8 +180,8 @@ static unsigned long cpu_clk_recalc_rate(struct clk_hw *hw,
         * SiRF SoC has not cpu clock control,
         * So return the parent pll rate.
         */
-       struct clk *parent_clk = clk_get_parent(hw->clk);
-       return __clk_get_rate(parent_clk);
+       struct clk_hw *parent_clk = clk_hw_get_parent(hw);
+       return clk_hw_get_rate(parent_clk);
 }
 
 static struct clk_ops std_pll_ops = {