Skip to content

Commit 80140a8

Browse files
gregkhmcgrof
authored andcommitted
module.h: simplify MODULE_IMPORT_NS
In commit ca321ec ("module.h: allow #define strings to work with MODULE_IMPORT_NS") I fixed up the MODULE_IMPORT_NS() macro to allow defined strings to work with it. Unfortunatly I did it in a two-stage process, when it could just be done with the __stringify() macro as pointed out by Masahiro Yamada. Clean this up to only be one macro instead of two steps to achieve the same end result. Fixes: ca321ec ("module.h: allow #define strings to work with MODULE_IMPORT_NS") Reported-by: Masahiro Yamada <[email protected]> Cc: Luis Chamberlain <[email protected]> Cc: Jessica Yu <[email protected]> Cc: Matthias Maennich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent eeaec78 commit 80140a8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

include/linux/module.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,7 @@ extern typeof(name) __mod_##type##__##name##_device_table \
290290
* files require multiple MODULE_FIRMWARE() specifiers */
291291
#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
292292

293-
#define _MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, #ns)
294-
#define MODULE_IMPORT_NS(ns) _MODULE_IMPORT_NS(ns)
293+
#define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, __stringify(ns))
295294

296295
struct notifier_block;
297296

0 commit comments

Comments
 (0)