aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorRicardo B. Marliere <[email protected]>2024-02-28 10:46:28 -0300
committerSebastian Reichel <[email protected]>2024-02-28 23:04:25 +0100
commitea4367c40c79a5f16cb0de8a94a6b72697d37f06 (patch)
tree391011dabb538265b5ae6cc7113a80e86709a818 /tools/perf/util/trace-event-scripting.c
parentb683d738c0a1c4c8fcf83fdf5eb4c6ce3d5130c6 (diff)
power: supply: core: move power_supply_attr_group into #ifdef block
When building with CONFIG_SYSFS=n, the build error below is triggered: ld: drivers/power/supply/power_supply_core.o:(.data+0x0): undefined reference to `power_supply_attr_group' The problem is that power_supply_attr_group is needed in power_supply_core.c but defined in power_supply_sysfs.c, which is only targeted with CONFIG_SYSFS=y. Therefore, move the extern declaration into the #ifdef block that checks for CONFIG_SYSFS, and define an empty static const struct otherwise. This is safe because the macro __ATRIBUTE_GROUPS in power_supply_core.c will expand into an empty attribute_group array. Cc: Greg Kroah-Hartman <[email protected]> Reported-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Fixes: 7b46b60944d7 ("power: supply: core: constify the struct device_type usage") Signed-off-by: Ricardo B. Marliere <[email protected]> Tested-by: Nathan Chancellor <[email protected]> # build Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions