diff options
author | Dinh Nguyen <dinguyen@opensource.altera.com> | 2015-07-06 22:59:01 -0500 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-07-28 11:58:59 -0700 |
commit | f0557fbe1303aade362bd578753a1c898a80851c (patch) | |
tree | 1e27f5e45ce914a635d8e0f0181dd530d4ee7ebe /drivers/clk/at91/clk-programmable.c | |
parent | 75ce0cdb6243d42daca6130e5feb71f536bb136e (diff) | |
download | linux-stable-f0557fbe1303aade362bd578753a1c898a80851c.tar.gz linux-stable-f0557fbe1303aade362bd578753a1c898a80851c.tar.bz2 linux-stable-f0557fbe1303aade362bd578753a1c898a80851c.zip |
clk: at91: 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>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/at91/clk-programmable.c')
-rw-r--r-- | drivers/clk/at91/clk-programmable.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/clk/at91/clk-programmable.c b/drivers/clk/at91/clk-programmable.c index 43dacad5c96d..ce9c3b9d00f2 100644 --- a/drivers/clk/at91/clk-programmable.c +++ b/drivers/clk/at91/clk-programmable.c @@ -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)) |