These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / clk / ti / dpll.c
index 11478a5..5519b38 100644 (file)
@@ -15,6 +15,7 @@
  * GNU General Public License for more details.
  */
 
+#include <linux/clk.h>
 #include <linux/clk-provider.h>
 #include <linux/slab.h>
 #include <linux/err.h>
@@ -162,7 +163,7 @@ static void __init _register_dpll(struct clk_hw *hw,
        clk = clk_register(NULL, &clk_hw->hw);
 
        if (!IS_ERR(clk)) {
-               omap2_init_clk_hw_omap_clocks(clk);
+               omap2_init_clk_hw_omap_clocks(&clk_hw->hw);
                of_clk_add_provider(node, of_clk_src_simple_get, clk);
                kfree(clk_hw->hw.init->parent_names);
                kfree(clk_hw->hw.init);
@@ -177,7 +178,7 @@ cleanup:
 }
 
 #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_ATAGS)
-void __iomem *_get_reg(u8 module, u16 offset)
+static void __iomem *_get_reg(u8 module, u16 offset)
 {
        u32 reg;
        struct clk_omap_reg *reg_setup;
@@ -319,7 +320,7 @@ static void _register_dpll_x2(struct device_node *node,
        if (IS_ERR(clk)) {
                kfree(clk_hw);
        } else {
-               omap2_init_clk_hw_omap_clocks(clk);
+               omap2_init_clk_hw_omap_clocks(&clk_hw->hw);
                of_clk_add_provider(node, of_clk_src_simple_get, clk);
        }
 }
@@ -341,7 +342,6 @@ static void __init of_ti_dpll_setup(struct device_node *node,
        struct clk_init_data *init = NULL;
        const char **parent_names = NULL;
        struct dpll_data *dd = NULL;
-       int i;
        u8 dpll_mode = 0;
 
        dd = kzalloc(sizeof(*dd), GFP_KERNEL);
@@ -370,8 +370,7 @@ static void __init of_ti_dpll_setup(struct device_node *node,
        if (!parent_names)
                goto cleanup;
 
-       for (i = 0; i < init->num_parents; i++)
-               parent_names[i] = of_clk_get_parent_name(node, i);
+       of_clk_parent_fill(node, parent_names, init->num_parents);
 
        init->parent_names = parent_names;