Thomas Weißschuh
6af39604c7
platform/x86: firmware_attributes_class: Drop lifecycle functions
...
There are no users left.
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-6-949f9709e405@weissschuh.net
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-01-09 13:40:27 +02:00
Thomas Weißschuh
d03cfde56f
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 >
2025-01-09 13:40:19 +02:00
Thomas Weißschuh
d0eee1be37
platform/x86: firmware_attributes_class: Move include linux/device/class.h
...
The header firmware_attributes_class.h uses 'struct class'. It should
also include the necessary dependency header.
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-1-949f9709e405@weissschuh.net
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2025-01-09 13:40:17 +02:00
Jeff Johnson
7add1ee346
platform/x86: add missing MODULE_DESCRIPTION() macros
...
With ARCH=x86, make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/platform/x86/amilo-rfkill.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/platform/x86/uv_sysfs.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/platform/x86/ibm_rtl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/platform/x86/xo1-rfkill.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/platform/x86/firmware_attributes_class.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/platform/x86/wireless-hotkey.o
Add the missing invocations of the MODULE_DESCRIPTION() macro.
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com >
Link: https://lore.kernel.org/r/20240611-md-drivers-platform-x86-v1-1-d850e53619ee@quicinc.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2024-06-24 13:33:20 +02:00
Ricardo B. Marliere
5878e5b760
platform/x86: make fw_attr_class constant
...
Since commit 43a7206b09 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the fw_attr_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net >
Link: https://lore.kernel.org/r/20240305-class_cleanup-platform-v1-1-9085c97b9355@marliere.net
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2024-03-12 12:48:13 +02:00
kernel test robot
ae8ee4c1e4
platform/x86: dell-wmi-sysman: fw_attr_inuse can be static
...
drivers/platform/x86/firmware_attributes_class.c:11:5: warning: symbol 'fw_attr_inuse' was not declared. Should it be static?
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: kernel test robot <lkp@intel.com >
Link: https://lore.kernel.org/r/20210603153936.GA65404@7832cb195c0b
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2021-06-16 17:47:52 +02:00
Mark Pearson
17b707fe5f
platform/x86: firmware_attributes_class: Create helper file for handling firmware-attributes class registration events
...
This offers shared code for registering the firmware_attributes_class,
which is used by the Dell and Lenovo WMI management drivers.
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Mark Pearson <markpearson@lenovo.com >
Link: https://lore.kernel.org/r/20210530223111.25929-1-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
2021-06-16 17:47:51 +02:00