linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Unexport __clk_of_table
@ 2019-06-26  4:15 Stephen Boyd
  2019-06-26  4:15 ` [PATCH 1/2] clk: Remove ifdef for COMMON_CLK in clk-provider.h Stephen Boyd
  2019-06-26  4:15 ` [PATCH 2/2] clk: Unexport __clk_of_table Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Boyd @ 2019-06-26  4:15 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd; +Cc: linux-kernel, linux-clk

I found this lying around, not sure if I sent it or not.

We don't need to export this symbol anymore. And having COMMON_CLK in
clk-provider.h seems to be an artifact. Here's a couple patches to clean
this stuff up.

Stephen Boyd (2):
  clk: Remove ifdef for COMMON_CLK in clk-provider.h
  clk: Unexport __clk_of_table

 drivers/clk/clk.c            | 1 +
 include/linux/clk-provider.h | 7 -------
 2 files changed, 1 insertion(+), 7 deletions(-)

-- 
Sent by a computer through tubes


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] clk: Remove ifdef for COMMON_CLK in clk-provider.h
  2019-06-26  4:15 [PATCH 0/2] Unexport __clk_of_table Stephen Boyd
@ 2019-06-26  4:15 ` Stephen Boyd
  2019-06-26  4:15 ` [PATCH 2/2] clk: Unexport __clk_of_table Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2019-06-26  4:15 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd; +Cc: linux-kernel, linux-clk

This ifdef has been there since the beginning of this file, but it
doesn't really seem to serve any purpose besides obfuscating the struct
definitions and #defines here from compilation units that include it.
Let's always expose these function prototypes and struct definitions so
that code can inspect clk providers without needing to have
CONFIG_COMMON_CLK enabled.

Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
 include/linux/clk-provider.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index bb6118f79784..3bced2ec9f26 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -9,8 +9,6 @@
 #include <linux/of.h>
 #include <linux/of_clk.h>
 
-#ifdef CONFIG_COMMON_CLK
-
 /*
  * flags used across common struct clk.  these flags should only affect the
  * top-level framework.  custom flags for dealing with hardware specifics
@@ -1019,5 +1017,4 @@ static inline int of_clk_detect_critical(struct device_node *np, int index,
 
 void clk_gate_restore_context(struct clk_hw *hw);
 
-#endif /* CONFIG_COMMON_CLK */
 #endif /* CLK_PROVIDER_H */
-- 
Sent by a computer through tubes


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] clk: Unexport __clk_of_table
  2019-06-26  4:15 [PATCH 0/2] Unexport __clk_of_table Stephen Boyd
  2019-06-26  4:15 ` [PATCH 1/2] clk: Remove ifdef for COMMON_CLK in clk-provider.h Stephen Boyd
@ 2019-06-26  4:15 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2019-06-26  4:15 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd; +Cc: linux-kernel, linux-clk

This symbol doesn't need to be exported to clk providers anymore.
Originally, it was hidden inside clk.c, but then OMAP needed to get
access to it in commit 819b4861c18d ("CLK: ti: add init support for
clock IP blocks"), but eventually that code also changed in commit
c08ee14cc663 ("clk: ti: change clock init to use generic of_clk_init")
and we were left with this exported. Move this back into clk.c so that
it isn't exposed anymore.

Signed-off-by: Stephen Boyd <sboyd@kernel.org>
---
 drivers/clk/clk.c            | 1 +
 include/linux/clk-provider.h | 4 ----
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index aa51756fd4d6..b34e84bb8167 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -4038,6 +4038,7 @@ struct of_clk_provider {
 	void *data;
 };
 
+extern struct of_device_id __clk_of_table;
 static const struct of_device_id __clk_of_table_sentinel
 	__used __section(__clk_of_table_end);
 
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 3bced2ec9f26..9ba000e3a50d 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -865,8 +865,6 @@ static inline long divider_ro_round_rate(struct clk_hw *hw, unsigned long rate,
  */
 unsigned long clk_hw_round_rate(struct clk_hw *hw, unsigned long rate);
 
-struct of_device_id;
-
 struct clk_onecell_data {
 	struct clk **clks;
 	unsigned int clk_num;
@@ -877,8 +875,6 @@ struct clk_hw_onecell_data {
 	struct clk_hw *hws[];
 };
 
-extern struct of_device_id __clk_of_table;
-
 #define CLK_OF_DECLARE(name, compat, fn) OF_DECLARE_1(clk, name, compat, fn)
 
 /*
-- 
Sent by a computer through tubes


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-26  4:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26  4:15 [PATCH 0/2] Unexport __clk_of_table Stephen Boyd
2019-06-26  4:15 ` [PATCH 1/2] clk: Remove ifdef for COMMON_CLK in clk-provider.h Stephen Boyd
2019-06-26  4:15 ` [PATCH 2/2] clk: Unexport __clk_of_table 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).