Skip to content

Commit 470b73a

Browse files
geertulinusw
authored andcommitted
pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent f90160f commit 470b73a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/pinctrl/sunxi/pinctrl-sunxi.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include <linux/io.h>
1414
#include <linux/clk.h>
15+
#include <linux/clk-provider.h>
1516
#include <linux/gpio/driver.h>
1617
#include <linux/irqdomain.h>
1718
#include <linux/irqchip/chained_irq.h>
@@ -1187,7 +1188,7 @@ static int sunxi_pinctrl_setup_debounce(struct sunxi_pinctrl *pctl,
11871188
int i, ret;
11881189

11891190
/* Deal with old DTs that didn't have the oscillators */
1190-
if (of_count_phandle_with_args(node, "clocks", "#clock-cells") != 3)
1191+
if (of_clk_get_parent_count(node) != 3)
11911192
return 0;
11921193

11931194
/* If we don't have any setup, bail out */

0 commit comments

Comments
 (0)