summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/clk/sunxi/clk-a20-gmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/clk/sunxi/clk-a20-gmac.c')
-rw-r--r--kernel/drivers/clk/sunxi/clk-a20-gmac.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/drivers/clk/sunxi/clk-a20-gmac.c b/kernel/drivers/clk/sunxi/clk-a20-gmac.c
index 0dcf4f205..1611b0364 100644
--- a/kernel/drivers/clk/sunxi/clk-a20-gmac.c
+++ b/kernel/drivers/clk/sunxi/clk-a20-gmac.c
@@ -80,9 +80,7 @@ static void __init sun7i_a20_gmac_clk_setup(struct device_node *node)
goto free_mux;
/* gmac clock requires exactly 2 parents */
- parents[0] = of_clk_get_parent_name(node, 0);
- parents[1] = of_clk_get_parent_name(node, 1);
- if (!parents[0] || !parents[1])
+ if (of_clk_parent_fill(node, parents, 2) != 2)
goto free_gate;
reg = of_iomap(node, 0);