diff options
author | Dinh Nguyen <dinguyen@opensource.altera.com> | 2015-07-07 06:59:05 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-07-28 21:59:05 +0300 |
commit | 8a53fb2bceea00081c4a6af7b477bea8ec00b74b (patch) | |
tree | f9c472e04a9b3218105d7b29984f09d194428d0e /drivers/clk/sunxi/clk-sun6i-ar100.c | |
parent | 0b4e7f0842fe5c8bd19654999f6c41c4119e7c90 (diff) | |
download | linux-8a53fb2bceea00081c4a6af7b477bea8ec00b74b.tar.xz |
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-sun6i-ar100.c')
-rw-r--r-- | drivers/clk/sunxi/clk-sun6i-ar100.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/sunxi/clk-sun6i-ar100.c b/drivers/clk/sunxi/clk-sun6i-ar100.c index 21b076ee59d1..3a2ea010f148 100644 --- a/drivers/clk/sunxi/clk-sun6i-ar100.c +++ b/drivers/clk/sunxi/clk-sun6i-ar100.c @@ -182,7 +182,6 @@ static int sun6i_a31_ar100_clk_probe(struct platform_device *pdev) struct resource *r; struct clk *clk; int nparents; - int i; ar100 = devm_kzalloc(&pdev->dev, sizeof(*ar100), GFP_KERNEL); if (!ar100) @@ -197,8 +196,7 @@ static int sun6i_a31_ar100_clk_probe(struct platform_device *pdev) if (nparents > SUN6I_AR100_MAX_PARENTS) nparents = SUN6I_AR100_MAX_PARENTS; - for (i = 0; i < nparents; i++) - parents[i] = of_clk_get_parent_name(np, i); + of_clk_parent_fill(np, parents, nparents); of_property_read_string(np, "clock-output-names", &clk_name); |