]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 19 Jan 2018 15:18:19 +0000 (16:18 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 22 Jan 2018 08:55:05 +0000 (09:55 +0100)
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sunxi/pinctrl-sunxi.c

index 131adf7953cd84e3b5e82ee394ad6d3f5bf29ca9..341312d665120a29472ce174474f870c913e5458 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <linux/io.h>
 #include <linux/clk.h>
+#include <linux/clk-provider.h>
 #include <linux/gpio/driver.h>
 #include <linux/irqdomain.h>
 #include <linux/irqchip/chained_irq.h>
@@ -1187,7 +1188,7 @@ static int sunxi_pinctrl_setup_debounce(struct sunxi_pinctrl *pctl,
        int i, ret;
 
        /* Deal with old DTs that didn't have the oscillators */
-       if (of_count_phandle_with_args(node, "clocks", "#clock-cells") != 3)
+       if (of_clk_get_parent_count(node) != 3)
                return 0;
 
        /* If we don't have any setup, bail out */