Commit 8c21c411 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

module: make __mod_device_table__* symbols static



The __mod_device_table__* symbols are only parsed by modpost to generate
MODULE_ALIAS() entries from MODULE_DEVICE_TABLE().

Therefore, these symbols do not need to be globally visible, or globally
unique.

If they are in the global scope, we would worry about the symbol
uniqueness, but modpost is fine with parsing multiple symbols with the
same name.

Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarPetr Pavlu <petr.pavlu@suse.com>
parent 7d95680d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -249,8 +249,8 @@ struct module_kobject *lookup_or_create_module_kobject(const char *name);
#ifdef MODULE
/* Creates an alias so file2alias.c can find device table. */
#define MODULE_DEVICE_TABLE(type, name)					\
extern typeof(name) __mod_device_table__##type##__##name		\
  __attribute__ ((unused, alias(__stringify(name))))
static typeof(name) __mod_device_table__##type##__##name		\
  __attribute__ ((used, alias(__stringify(name))))
#else  /* !MODULE */
#define MODULE_DEVICE_TABLE(type, name)
#endif