diff options
| author | Thomas Weißschuh <linux@weissschuh.net> | 2025-01-04 02:05:10 +0300 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-01-09 14:40:19 +0300 |
| commit | d03cfde56f5cf9ec50b4cf099a42bf056fc80ddd (patch) | |
| tree | b012155c694e256256f8f23b345413605dd922d3 /drivers/platform/x86/firmware_attributes_class.h | |
| parent | d0eee1be379204d2ee6cdb09bd98b3fd0165b6d3 (diff) | |
| download | linux-d03cfde56f5cf9ec50b4cf099a42bf056fc80ddd.tar.xz | |
platform/x86: firmware_attributes_class: Simplify API
The module core already guarantees that a module can only be unloaded
after all other modules using its symbols have been unloaded.
As it's already the responsibility of the drivers using
firmware_attributes_class to clean up their devices before unloading,
the lifetime of the firmware_attributes_class can be bound to the
lifetime of the module.
This enables the direct usage of firmware_attributes_class from the
drivers, without having to go through the lifecycle functions,
leading to simplifications for both the subsystem and its users.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20250104-firmware-attributes-simplify-v1-2-949f9709e405@weissschuh.net
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/firmware_attributes_class.h')
| -rw-r--r-- | drivers/platform/x86/firmware_attributes_class.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/firmware_attributes_class.h b/drivers/platform/x86/firmware_attributes_class.h index 8e0f47cfdf92..ef6c3764a834 100644 --- a/drivers/platform/x86/firmware_attributes_class.h +++ b/drivers/platform/x86/firmware_attributes_class.h @@ -7,6 +7,7 @@ #include <linux/device/class.h> +extern const struct class firmware_attributes_class; int fw_attributes_class_get(const struct class **fw_attr_class); int fw_attributes_class_put(void); |
