mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 00:29:50 +00:00
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;
|
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,
|
|||||||
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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user