public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] of: drop symbols declared by _OF_DECLARE() from modules
@ 2016-01-14  4:33 Masahiro Yamada
  2016-01-14 10:14 ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2016-01-14  4:33 UTC (permalink / raw)
  To: linux-arm-kernel

The users of this macro (OF_EARLYCON_DECLARE, CLK_OF_DECLARE,
IRQCHIP_DECLARE, etc.) are only parsed in the early boot stage.

Such symbols contained in modules are never used.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

OF_EARLYCON_DECLARE() is declared in several tristate drivers.

This patch makes each low-level driver be free from
taking care of it.

See this patch
https://patchwork.kernel.org/patch/8028771/


 include/linux/of.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index dd10626..dc6e396 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -929,7 +929,7 @@ static inline int of_get_available_child_count(const struct device_node *np)
 	return num;
 }
 
-#ifdef CONFIG_OF
+#if defined(CONFIG_OF) && !defined(MODULE)
 #define _OF_DECLARE(table, name, compat, fn, fn_type)			\
 	static const struct of_device_id __of_table_##name		\
 		__used __section(__##table##_of_table)			\
-- 
1.9.1

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

end of thread, other threads:[~2016-01-14 10:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-14  4:33 [PATCH] of: drop symbols declared by _OF_DECLARE() from modules Masahiro Yamada
2016-01-14 10:14 ` Arnd Bergmann
2016-01-14 10:21   ` Masahiro Yamada
2016-01-14 10:23     ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox