From: Geert Uytterhoeven Date: Wed, 18 Apr 2018 14:50:05 +0000 (+0200) Subject: pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=10e3a88b29eeb839eeb38bb96ebd43866ba87e73;p=linux.git pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding A new open coder has crept in since 470b73a38470e8ba ("pinctrl: sunxi: Use of_clk_get_parent_count() instead of open coding"), replace it. of_clk_get_parent_count() was moved to , so include that instead of . Signed-off-by: Geert Uytterhoeven Acked-by: Maxime Ripard Reviewed-by: Linus Walleij Reviewed-by: Daniel Lezcano Signed-off-by: Stephen Boyd --- diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index 020d6d84639ca..25e80a5370ca0 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -12,12 +12,12 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -1361,7 +1361,7 @@ int sunxi_pinctrl_init_with_variant(struct platform_device *pdev, goto gpiochip_error; } - ret = of_count_phandle_with_args(node, "clocks", "#clock-cells"); + ret = of_clk_get_parent_count(node); clk = devm_clk_get(&pdev->dev, ret == 1 ? NULL : "apb"); if (IS_ERR(clk)) { ret = PTR_ERR(clk);