|
@@ -24,7 +24,7 @@ static const char ** __init clkgen_mux_get_parents(struct device_node *np,
|
|
|
int *num_parents)
|
|
|
{
|
|
|
const char **parents;
|
|
|
- int nparents, i;
|
|
|
+ int nparents;
|
|
|
|
|
|
nparents = of_clk_get_parent_count(np);
|
|
|
if (WARN_ON(nparents <= 0))
|
|
@@ -34,10 +34,7 @@ static const char ** __init clkgen_mux_get_parents(struct device_node *np,
|
|
|
if (!parents)
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
|
|
|
- for (i = 0; i < nparents; i++)
|
|
|
- parents[i] = of_clk_get_parent_name(np, i);
|
|
|
-
|
|
|
- *num_parents = nparents;
|
|
|
+ *num_parents = of_clk_parent_fill(np, parents, nparents);
|
|
|
return parents;
|
|
|
}
|
|
|
|