Commit 470b73a3 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Walleij

pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f90160fc
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/gpio/driver.h> #include <linux/gpio/driver.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h> #include <linux/irqchip/chained_irq.h>
...@@ -1187,7 +1188,7 @@ static int sunxi_pinctrl_setup_debounce(struct sunxi_pinctrl *pctl, ...@@ -1187,7 +1188,7 @@ static int sunxi_pinctrl_setup_debounce(struct sunxi_pinctrl *pctl,
int i, ret; int i, ret;
/* Deal with old DTs that didn't have the oscillators */ /* 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; return 0;
/* If we don't have any setup, bail out */ /* If we don't have any setup, bail out */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment