diff options
author | Dinh Nguyen <dinguyen@opensource.altera.com> | 2015-06-05 19:26:14 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-06-06 04:10:34 +0300 |
commit | 761d3e328c503c8428cec54e33196e49f5c46e55 (patch) | |
tree | 1c3a34553847127f119f7da0ba40073345331c28 /drivers/clk/socfpga/clk-pll.c | |
parent | 2e61dfb3602b904966491f260f62c01b9895936a (diff) | |
download | linux-761d3e328c503c8428cec54e33196e49f5c46e55.tar.xz |
clk: socfpga: make use of of_clk_parent_fill helper function
Use of_clk_parent_fill to fill in the parent clock's array.
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/socfpga/clk-pll.c')
-rw-r--r-- | drivers/clk/socfpga/clk-pll.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/clk/socfpga/clk-pll.c b/drivers/clk/socfpga/clk-pll.c index de6da957a09d..8f26b5234947 100644 --- a/drivers/clk/socfpga/clk-pll.c +++ b/drivers/clk/socfpga/clk-pll.c @@ -92,7 +92,6 @@ static __init struct clk *__socfpga_pll_init(struct device_node *node, struct clk_init_data init; struct device_node *clkmgr_np; int rc; - int i = 0; of_property_read_u32(node, "reg", ®); @@ -111,11 +110,7 @@ static __init struct clk *__socfpga_pll_init(struct device_node *node, init.ops = ops; init.flags = 0; - while (i < SOCFPGA_MAX_PARENTS && (parent_name[i] = - of_clk_get_parent_name(node, i)) != NULL) - i++; - - init.num_parents = i; + init.num_parents = of_clk_parent_fill(node, parent_name, SOCFPGA_MAX_PARENTS); init.parent_names = parent_name; pll_clk->hw.hw.init = &init; |