Skip to content

Commit 3e4d890

Browse files
committed
modules: make MODULE_IMPORT_NS() work even when modular builds are disabled
It's an unusual configuration, and was apparently never tested, and not caught in linux-next because of a combination of travels and it making it into the tree too late. The fix is to simply move the #define to outside the CONFIG_MODULE section, since MODULE_INFO() will do the right thing. Cc: Martijn Coenen <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Matthias Maennich <[email protected]> Cc: Jessica Yu <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9dbd83f commit 3e4d890

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/module.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,12 @@ extern typeof(name) __mod_##type##__##name##_device_table \
276276
* files require multiple MODULE_FIRMWARE() specifiers */
277277
#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
278278

279+
#define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, #ns)
280+
279281
struct notifier_block;
280282

281283
#ifdef CONFIG_MODULES
282284

283-
#define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, #ns)
284-
285285
extern int modules_disabled; /* for sysctl */
286286
/* Get/put a kernel symbol (calls must be symmetric) */
287287
void *__symbol_get(const char *symbol);

0 commit comments

Comments
 (0)