[PATCH 2/2] fixup! clk: Port of_clk_set_defaults()

Andrey Smirnov andrew.smirnov at gmail.com
Tue Nov 15 08:22:56 PST 2016


---
 drivers/clk/clk-conf.c       | 4 ++++
 include/linux/clk/clk-conf.h | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
index 961fad8..93271b4 100644
--- a/drivers/clk/clk-conf.c
+++ b/drivers/clk/clk-conf.c
@@ -14,6 +14,8 @@
 #include <linux/err.h>
 #include <linux/clk/clk-conf.h>
 
+#if defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)
+
 static int __set_clk_parents(struct device_node *node, bool clk_supplier)
 {
 	struct of_phandle_args clkspec;
@@ -142,3 +144,5 @@ int of_clk_set_defaults(struct device_node *node, bool clk_supplier)
 	return __set_clk_rates(node, clk_supplier);
 }
 EXPORT_SYMBOL_GPL(of_clk_set_defaults);
+
+#endif
diff --git a/include/linux/clk/clk-conf.h b/include/linux/clk/clk-conf.h
index 0b8a973..8f4382e 100644
--- a/include/linux/clk/clk-conf.h
+++ b/include/linux/clk/clk-conf.h
@@ -7,8 +7,11 @@
  * published by the Free Software Foundation.
  */
 
+#if defined(CONFIG_OFTREE) && defined(CONFIG_COMMON_CLK_OF_PROVIDER)
+
 #include <linux/types.h>
 
 struct device_node;
 int of_clk_set_defaults(struct device_node *node, bool clk_supplier);
 
+#endif
-- 
2.5.5




More information about the barebox mailing list