提交 0a65239c 编写于 作者: G Geert Uytterhoeven 提交者: Stephen Boyd

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

Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册