diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-10-17 06:37:33 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2024-10-17 22:42:08 +0200 |
commit | 44fcc479a574a4055fb6aed1f786d39999466383 (patch) | |
tree | f5342168ac264cdf3a23599aa6d2f8ffb2844718 /drivers | |
parent | power: supply: rk817: Update battery capacity calibration (diff) | |
download | linux-44fcc479a574a4055fb6aed1f786d39999466383.tar.xz linux-44fcc479a574a4055fb6aed1f786d39999466383.zip |
power: supply: hwmon: move interface to private header
The interface of power_supply_hwmon.c is only meant to be used by the
psy core. Remove it from the public header file and use the private one
instead.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20241017-power-supply-cleanups-v2-1-cb0f5deab088@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/supply/power_supply.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/power/supply/power_supply.h b/drivers/power/supply/power_supply.h index 4c558fb3db72..7434a6f24775 100644 --- a/drivers/power/supply/power_supply.h +++ b/drivers/power/supply/power_supply.h @@ -44,3 +44,20 @@ static inline int power_supply_create_triggers(struct power_supply *psy) static inline void power_supply_remove_triggers(struct power_supply *psy) {} #endif /* CONFIG_LEDS_TRIGGERS */ + +#ifdef CONFIG_POWER_SUPPLY_HWMON + +int power_supply_add_hwmon_sysfs(struct power_supply *psy); +void power_supply_remove_hwmon_sysfs(struct power_supply *psy); + +#else + +static inline int power_supply_add_hwmon_sysfs(struct power_supply *psy) +{ + return 0; +} + +static inline +void power_supply_remove_hwmon_sysfs(struct power_supply *psy) {} + +#endif /* CONFIG_POWER_SUPPLY_HWMON */ |