mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-11 12:30:09 +00:00
[ Upstream commitd03cfde56f] 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> Stable-dep-of:5ff1fbb305("platform/x86: think-lmi: Fix class device unregistration") Signed-off-by: Sasha Levin <sashal@kernel.org>
15 lines
352 B
C
15 lines
352 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/* Firmware attributes class helper module */
|
|
|
|
#ifndef FW_ATTR_CLASS_H
|
|
#define FW_ATTR_CLASS_H
|
|
|
|
#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);
|
|
|
|
#endif /* FW_ATTR_CLASS_H */
|