clk: sunxi: make use of of_clk_parent_fill helper function
[deliverable/linux.git] / drivers / clk / sunxi / clk-sun6i-ar100.c
index 21b076ee59d1dae79a936bc8f6022f0e929c6bf4..3a2ea010f148f3a1ef73f938f71cb0671b9bf6e5 100644 (file)
@@ -182,7 +182,6 @@ static int sun6i_a31_ar100_clk_probe(struct platform_device *pdev)
        struct resource *r;
        struct clk *clk;
        int nparents;
-       int i;
 
        ar100 = devm_kzalloc(&pdev->dev, sizeof(*ar100), GFP_KERNEL);
        if (!ar100)
@@ -197,8 +196,7 @@ static int sun6i_a31_ar100_clk_probe(struct platform_device *pdev)
        if (nparents > SUN6I_AR100_MAX_PARENTS)
                nparents = SUN6I_AR100_MAX_PARENTS;
 
-       for (i = 0; i < nparents; i++)
-               parents[i] = of_clk_get_parent_name(np, i);
+       of_clk_parent_fill(np, parents, nparents);
 
        of_property_read_string(np, "clock-output-names", &clk_name);
 
This page took 0.024973 seconds and 5 git commands to generate.