[PATCH] modules/firmware: add a new option to denote a firmware group to choose one.
Dave Airlie
airlied at gmail.com
Wed Apr 19 04:36:52 UTC 2023
From: Dave Airlie <airlied at redhat.com>
This adds a tag that will go into the module info, only one firmware from
the group given needs to be available for this driver to work. This allows
dracut to avoid adding in firmware that aren't needed.
This just brackets a module list in the modinfo, the modules in the list
will get entries in reversed order so the last module in the list is the
preferred one.
The corresponding dracut code it at:
https://github.com/dracutdevs/dracut/pull/2309
Cc: Luis Chamberlain <mcgrof at kernel.org>
Cc: linux-modules at vger.kernel.org
Cc: dri-devel at lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
include/linux/module.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/module.h b/include/linux/module.h
index 4435ad9439ab..f02448ed5e2b 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -289,6 +289,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_FIRMWARE_GROUP_ONLY_ONE(_grpname) MODULE_INFO(firmware_group_only_one, _grpname)
+
#define MODULE_IMPORT_NS(ns) MODULE_INFO(import_ns, __stringify(ns))
struct notifier_block;
--
2.39.2
More information about the dri-devel
mailing list