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

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
Geert Uytterhoeven 2015-05-29 11:25:46 +02:00 committed by Stephen Boyd
parent 51a43be9fa
commit 0a65239c28
2 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
const char **parents;
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))
return NULL;

View File

@ -26,7 +26,7 @@ static const char ** __init clkgen_mux_get_parents(struct device_node *np,
const char **parents;
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))
return ERR_PTR(-EINVAL);