Skip to content

Commit 44fcc47

Browse files
t-8chsre
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 1e5335d commit 44fcc47

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

drivers/power/supply/power_supply.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,20 @@ static inline int power_supply_create_triggers(struct power_supply *psy)
4444
static inline void power_supply_remove_triggers(struct power_supply *psy) {}
4545

4646
#endif /* CONFIG_LEDS_TRIGGERS */
47+
48+
#ifdef CONFIG_POWER_SUPPLY_HWMON
49+
50+
int power_supply_add_hwmon_sysfs(struct power_supply *psy);
51+
void power_supply_remove_hwmon_sysfs(struct power_supply *psy);
52+
53+
#else
54+
55+
static inline int power_supply_add_hwmon_sysfs(struct power_supply *psy)
56+
{
57+
return 0;
58+
}
59+
60+
static inline
61+
void power_supply_remove_hwmon_sysfs(struct power_supply *psy) {}
62+
63+
#endif /* CONFIG_POWER_SUPPLY_HWMON */

include/linux/power_supply.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -937,19 +937,6 @@ static inline bool power_supply_is_watt_property(enum power_supply_property psp)
937937
return false;
938938
}
939939

940-
#ifdef CONFIG_POWER_SUPPLY_HWMON
941-
int power_supply_add_hwmon_sysfs(struct power_supply *psy);
942-
void power_supply_remove_hwmon_sysfs(struct power_supply *psy);
943-
#else
944-
static inline int power_supply_add_hwmon_sysfs(struct power_supply *psy)
945-
{
946-
return 0;
947-
}
948-
949-
static inline
950-
void power_supply_remove_hwmon_sysfs(struct power_supply *psy) {}
951-
#endif
952-
953940
#ifdef CONFIG_SYSFS
954941
ssize_t power_supply_charge_behaviour_show(struct device *dev,
955942
unsigned int available_behaviours,

0 commit comments

Comments
 (0)