From b683d738c0a1c4c8fcf83fdf5eb4c6ce3d5130c6 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Tue, 27 Feb 2024 13:34:42 -0700 Subject: power: supply: core: Fix power_supply_init_attrs() stub When building without CONFIG_SYSFS, there is an error because of a recent refactoring that failed to update the stub of power_supply_init_attrs(): drivers/power/supply/power_supply_core.c: In function 'power_supply_class_init': drivers/power/supply/power_supply_core.c:1630:9: error: too few arguments to function 'power_supply_init_attrs' 1630 | power_supply_init_attrs(); | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/power/supply/power_supply_core.c:25: drivers/power/supply/power_supply.h:25:20: note: declared here 25 | static inline void power_supply_init_attrs(struct device_type *dev_type) {} | ^~~~~~~~~~~~~~~~~~~~~~~ Update the stub function to take no parameters like the rest of the refactoring, which resolves the build error. Fixes: 7b46b60944d7 ("power: supply: core: constify the struct device_type usage") Signed-off-by: Nathan Chancellor Reviewed-by: Ricardo B. Marliere Link: https://lore.kernel.org/r/20240227-fix-power_supply_init_attrs-stub-v1-1-43365e68d4b3@kernel.org Signed-off-by: Sebastian Reichel --- drivers/power/supply/power_supply.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/power') diff --git a/drivers/power/supply/power_supply.h b/drivers/power/supply/power_supply.h index 232fdd8c1212..7d05756398b9 100644 --- a/drivers/power/supply/power_supply.h +++ b/drivers/power/supply/power_supply.h @@ -22,7 +22,7 @@ extern int power_supply_uevent(const struct device *dev, struct kobj_uevent_env #else -static inline void power_supply_init_attrs(struct device_type *dev_type) {} +static inline void power_supply_init_attrs(void) {} #define power_supply_uevent NULL #endif /* CONFIG_SYSFS */ -- cgit v1.2.3