summaryrefslogtreecommitdiff
path: root/drivers/clk/sunxi/clk-factors.c
diff options
context:
space:
mode:
authorDinh Nguyen <dinguyen@opensource.altera.com>2015-07-06 22:59:05 -0500
committerStephen Boyd <sboyd@codeaurora.org>2015-07-28 11:59:05 -0700
commit8a53fb2bceea00081c4a6af7b477bea8ec00b74b (patch)
treef9c472e04a9b3218105d7b29984f09d194428d0e /drivers/clk/sunxi/clk-factors.c
parent0b4e7f0842fe5c8bd19654999f6c41c4119e7c90 (diff)
clk: sunxi: 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> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: "Emilio López" <emilio@elopez.com.ar> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/sunxi/clk-factors.c')
-rw-r--r--drivers/clk/sunxi/clk-factors.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c
index 94e2570a2409..a650eae4cc49 100644
--- a/drivers/clk/sunxi/clk-factors.c
+++ b/drivers/clk/sunxi/clk-factors.c
@@ -175,9 +175,7 @@ struct clk *sunxi_factors_register(struct device_node *node,
int i = 0;
/* if we have a mux, we will have >1 parents */
- while (i < FACTORS_MAX_PARENTS &&
- (parents[i] = of_clk_get_parent_name(node, i)) != NULL)
- i++;
+ i = of_clk_parent_fill(node, parents, FACTORS_MAX_PARENTS);
/*
* some factor clocks, such as pll5 and pll6, may have multiple