From: Geert Uytterhoeven Date: Fri, 19 Jan 2018 15:18:19 +0000 (+0100) Subject: pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding X-Git-Tag: v4.16-rc1~90^2~2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=470b73a38470e8baf923b8424b5f54870efaef22;p=linux.git pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding Signed-off-by: Geert Uytterhoeven Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 131adf7953cd..341312d66512 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -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 */