[PATCH master] clk: support inclusion of clk-provider.h in !COMMON_CLK code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Most of the file is macros, but the little C code there is fails to
compile when built with !COMMON_CLK due to struct clk_div_table and
clk_hw_get_parent being undefined.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 include/linux/clk-provider.h | 2 ++
 include/linux/clk.h          | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index eab8305821e5..602e772a54bb 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -8,6 +8,8 @@
 
 #include <linux/clk.h>
 
+struct clk_div_table;
+
 long divider_round_rate_parent(struct clk_hw *hw, struct clk_hw *parent,
 			       unsigned long rate, unsigned long *prate,
 			       const struct clk_div_table *table,
diff --git a/include/linux/clk.h b/include/linux/clk.h
index bd107962fb88..ae03dcfdb2a2 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -187,6 +187,12 @@ static inline struct clk *clk_get_parent(struct clk *clk)
 	return NULL;
 }
 
+static inline struct clk_hw *clk_hw_get_parent(struct clk_hw *hw)
+
+{
+	return NULL;
+}
+
 static inline int clk_hw_get_parent_index(struct clk_hw *hw)
 {
 	return -EINVAL;
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux