]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
clk: st: Use of_clk_get_parent_count() instead of open coding
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 29 May 2015 09:25:46 +0000 (11:25 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 4 Jun 2015 20:51:34 +0000 (13:51 -0700)
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/st/clk-flexgen.c
drivers/clk/st/clkgen-mux.c

index 409ed4b0b569ff603610a6054b6427b019c75f2f..657ca14ba709a64b97e297e74f15f8f5d751efdf 100644 (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;
 
index 80aa77dbf660cf0c0c68051c37c561d7c7995120..4fbe6e099587c0541ce9a22783fb2dc4e4becf8c 100644 (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);