summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sunxi
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2018-04-18 16:50:05 +0200
committerStephen Boyd <sboyd@kernel.org>2018-05-02 08:35:40 -0700
commit10e3a88b29eeb839eeb38bb96ebd43866ba87e73 (patch)
treeb3e284e87bc136d12cb0c95a41251b5698169598 /drivers/pinctrl/sunxi
parent3fd0121b0242dacc020046dade5a0362b6522c5b (diff)
downloadlinux-0-day-10e3a88b29eeb839eeb38bb96ebd43866ba87e73.tar.gz
linux-0-day-10e3a88b29eeb839eeb38bb96ebd43866ba87e73.tar.xz
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 <linux/of_clk.h>, so include that instead of <linux/clk-provider.h>. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/pinctrl/sunxi')
-rw-r--r--drivers/pinctrl/sunxi/pinctrl-sunxi.c4
1 files changed, 2 insertions, 2 deletions
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 <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>
#include <linux/export.h>
#include <linux/of.h>
+#include <linux/of_clk.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/of_irq.h>
@@ -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);