Skip to content

Commit

Permalink
module.h: allow #define strings to work with MODULE_IMPORT_NS
Browse files Browse the repository at this point in the history
The MODULE_IMPORT_NS() macro does not allow defined strings to work
properly with it, so add a layer of indirection to allow this to happen.

Cc: Luis Chamberlain <[email protected]>
Cc: Jessica Yu <[email protected]>
Cc: Matthias Maennich <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Matthias Maennich <[email protected]>
Signed-off-by: Luis Chamberlain <[email protected]>
  • Loading branch information
gregkh authored and mcgrof committed Jan 12, 2022
1 parent b1ae6dc commit ca321ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ extern typeof(name) __mod_##type##__##name##_device_table \
* files require multiple MODULE_FIRMWARE() specifiers */
#define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)

#define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, #ns)
#define _MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, #ns)
#define MODULE_IMPORT_NS(ns) _MODULE_IMPORT_NS(ns)

struct notifier_block;

Expand Down

0 comments on commit ca321ec

Please sign in to comment.