Skip to contentSkip to conversation

clk: core: add __init decoration for CLK_OF_DECLARE_DRIVER function

PATCH New Shawn Guo 2 participants 2 messages Oct 8, 2016 – Oct 17, 2016 Common clk

lore
Share & tools
lore

Shawn Guo

author
#0 lore raw

PATCH 1/1 clk: core: add __init decoration for CLK_OF_DECLARE_DRIVER function

The new introduced macro CLK_OF_DECLARE_DRIVER is usually used to declare clock driver init functions, which are mostly decorated with __init. Add __init decoration for CLK_OF_DECLARE_DRIVER function to avoid causing section mismatch warnings on client clock drivers.

---
 include/linux/clk-provider.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/clk-provider.h +1 -1
index af596381fa0f..a428aec36ace 100644
@@ -785,7 +785,7 @@ struct clk_hw_onecell_data {
  * routines, one at of_clk_init(), and one at platform device probe
  */
 #define CLK_OF_DECLARE_DRIVER(name, compat, fn) \
-	static void name##_of_clk_init_driver(struct device_node *np)	\
+	static void __init name##_of_clk_init_driver(struct device_node *np) \
 	{								\
 		of_node_clear_flag(np, OF_POPULATED);			\
 		fn(np);							\
Signature · 1 line
1.9.1
Applied
#1 lore raw

PATCH 1/1 clk: core: add __init decoration for CLK_OF_DECLARE_DRIVER function

Quoted 7 lines · Shawn Guo

The new introduced macro CLK_OF_DECLARE_DRIVER is usually used to declare clock driver init functions, which are mostly decorated with __init. Add __init decoration for CLK_OF_DECLARE_DRIVER function to avoid causing section mismatch warnings on client clock drivers.

---

Applied to clk-fixes

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project