summaryrefslogtreecommitdiff
path: root/drivers/clk/st/clk-flexgen.c
diff options
context:
space:
mode:
authorDinh Nguyen <dinguyen@opensource.altera.com>2015-07-06 22:59:04 -0500
committerStephen Boyd <sboyd@codeaurora.org>2015-07-28 11:59:03 -0700
commit0b4e7f0842fe5c8bd19654999f6c41c4119e7c90 (patch)
treedcbab045ab0c6f0d97aef2c402ed1429db9906a6 /drivers/clk/st/clk-flexgen.c
parent5f23eff7af6bc1d8cc8e17fc12e8d989042236ed (diff)
clk: st: make use of of_clk_parent_fill helper function
Use of_clk_parent_fill to fill in the parent clock names' array. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com> Tested-by Gabriel Fernandez <gabriel.fernandez@st.com> Cc: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/st/clk-flexgen.c')
-rw-r--r--drivers/clk/st/clk-flexgen.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c
index 8dd8cce27361..308dc2f265b1 100644
--- a/drivers/clk/st/clk-flexgen.c
+++ b/drivers/clk/st/clk-flexgen.c
@@ -243,7 +243,7 @@ static const char ** __init flexgen_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))
@@ -253,10 +253,8 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
if (!parents)
return NULL;
- for (i = 0; i < nparents; i++)
- parents[i] = of_clk_get_parent_name(np, i);
+ *num_parents = of_clk_parent_fill(np, parents, nparents);
- *num_parents = nparents;
return parents;
}