clk: at91: make use of of_clk_parent_fill helper function
[deliverable/linux.git] / drivers / clk / at91 / clk-programmable.c
index 43dacad5c96d30cb53cc68aa0ed53163b26547bc..ce9c3b9d00f2e8ebeba0ac17104e654e2eb2769a 100644 (file)
@@ -231,7 +231,6 @@ of_at91_clk_prog_setup(struct device_node *np, struct at91_pmc *pmc,
 {
        int num;
        u32 id;
-       int i;
        struct clk *clk;
        int num_parents;
        const char *parent_names[PROG_SOURCE_MAX];
@@ -242,11 +241,7 @@ of_at91_clk_prog_setup(struct device_node *np, struct at91_pmc *pmc,
        if (num_parents <= 0 || num_parents > PROG_SOURCE_MAX)
                return;
 
-       for (i = 0; i < num_parents; ++i) {
-               parent_names[i] = of_clk_get_parent_name(np, i);
-               if (!parent_names[i])
-                       return;
-       }
+       of_clk_parent_fill(np, parent_names, num_parents);
 
        num = of_get_child_count(np);
        if (!num || num > (PROG_ID_MAX + 1))
This page took 0.04062 seconds and 5 git commands to generate.