forked from Minki/linux
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:
parent
51a43be9fa
commit
0a65239c28
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user