Commit 0a65239c authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Stephen Boyd

clk: st: Use of_clk_get_parent_count() instead of open coding

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 51a43be9
...@@ -245,7 +245,7 @@ static const char ** __init flexgen_get_parents(struct device_node *np, ...@@ -245,7 +245,7 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
const char **parents; const char **parents;
int nparents, i; int nparents, i;
nparents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); nparents = of_clk_get_parent_count(np);
if (WARN_ON(nparents <= 0)) if (WARN_ON(nparents <= 0))
return NULL; return NULL;
......
...@@ -26,7 +26,7 @@ static const char ** __init clkgen_mux_get_parents(struct device_node *np, ...@@ -26,7 +26,7 @@ static const char ** __init clkgen_mux_get_parents(struct device_node *np,
const char **parents; const char **parents;
int nparents, i; int nparents, i;
nparents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); nparents = of_clk_get_parent_count(np);
if (WARN_ON(nparents <= 0)) if (WARN_ON(nparents <= 0))
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment