linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: Add stubs for of_clk_*() APIs when CONFIG_OF=n
@ 2015-10-26 18:58 Stephen Boyd
  0 siblings, 0 replies; only message in thread
From: Stephen Boyd @ 2015-10-26 18:58 UTC (permalink / raw)
  To: Mike Turquette, Stephen Boyd
  Cc: linux-kernel, linux-clk, Javier Martinez Canillas

Compiling the versatile clock driver with COMPILE_TEST=y and CONFIG_OF=n
leads to the following error:

   drivers/clk/versatile/clk-sp810.c: In function 'clk_sp810_of_setup':
   drivers/clk/versatile/clk-sp810.c:103:6: error: implicit declaration of
function 'of_clk_parent_fill' [-Werror=implicit-function-declaration]

Silence it by providing stubs APIs for of_clk_parent_fill().
Throw in a stub for of_clk_get_parent_count() too because we're
in the area.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 include/linux/clk-provider.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 837cd7c7c8a7..ff7284fb37b2 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -726,6 +726,15 @@ static inline struct clk *of_clk_src_onecell_get(
 {
 	return ERR_PTR(-ENOENT);
 }
+static inline int of_clk_get_parent_count(struct device_node *np)
+{
+	return 0;
+}
+static inline int of_clk_parent_fill(struct device_node *np,
+				     const char **parents, unsigned int size)
+{
+	return 0;
+}
 static inline const char *of_clk_get_parent_name(struct device_node *np,
 						 int index)
 {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-26 18:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-26 18:58 [PATCH] clk: Add stubs for of_clk_*() APIs when CONFIG_OF=n Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).