usb: dwc3: of-simple: remove include of clk-provider.h
authorShawn Guo <shawn.guo@linaro.org>
Sun, 13 Aug 2017 14:21:11 +0000 (22:21 +0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 15 Aug 2017 11:18:53 +0000 (14:18 +0300)
The header clk-provider.h is there for clock drivers (providers) to
include, not client drivers (consumers).  That said,
of_clk_get_parent_count() is a helper function for clock providers, not
a clk API for consumers.

Let's replace of_clk_get_parent_count() with of_count_phandle_with_args()
call, so that we can remove the include of clk-provider.h.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/dwc3-of-simple.c

index fe414e7a9c78cda7405db573f321da91d0d4eb5b..4cef7d4f9cd060736ee53df87d2ca7b5dd931632 100644 (file)
@@ -25,7 +25,6 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
@@ -96,7 +95,8 @@ static int dwc3_of_simple_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, simple);
        simple->dev = dev;
 
-       ret = dwc3_of_simple_clk_init(simple, of_clk_get_parent_count(np));
+       ret = dwc3_of_simple_clk_init(simple, of_count_phandle_with_args(np,
+                                               "clocks", "#clock-cells"));
        if (ret)
                return ret;