Skip to content
Commit f107e6b8 authored by Ricardo B. Marliere's avatar Ricardo B. Marliere Committed by Sebastian Reichel
Browse files

power: supply: move power_supply_attr_groups definition back to sysfs



As reported by the kernel test robot, 'power_supply_attr_group' is defined
but not used when CONFIG_SYSFS is not set. Sebastian suggested that the
correct fix implemented by this patch, instead of my attempt in commit
ea4367c4 ("power: supply: core: move power_supply_attr_group into #ifdef
block"), is to define power_supply_attr_groups in power_supply_sysfs.c and
expose it in the power_supply.h header. For the case where CONFIG_SYSFS=n,
define it as NULL.

Suggested-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Fixes: ea4367c4 ("power: supply: core: move power_supply_attr_group into #ifdef block")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403021518.SUQzk3oA-lkp@intel.com/


Signed-off-by: default avatarRicardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240303-class_cleanup-power-v2-1-e248b7128519@marliere.net


Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent ea1ec769
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment