Skip to content

Commit 67ff955

Browse files
author
Al Stone
committed
power: supply: Provide stubs for charge_behaviour helpers
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2071846 Tested: This is one of a series of patch sets to enable Arm SystemReady IR support in the kernel for NXP i.MX8 platforms. This set updates the power subsystem. This set has been tested via simple boot tests and the CI loop. commit 3367d1b Author: Thomas Weißschuh <linux@weissschuh.net> Date: Sat Jan 8 16:31:58 2022 +0100 power: supply: Provide stubs for charge_behaviour helpers When CONFIG_SYSFS is not enabled provide stubs for the helper functions to not break their callers. Fixes: 539b9c9 ("power: supply: add helpers for charge_behaviour sysfs") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20220108153158.189489-1-linux@weissschuh.net Signed-off-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit 3367d1b) Signed-off-by: Al Stone <ahs3@redhat.com>
1 parent f8c4292 commit 67ff955

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

include/linux/power_supply.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,21 @@ ssize_t power_supply_charge_behaviour_show(struct device *dev,
725725
char *buf);
726726

727727
int power_supply_charge_behaviour_parse(unsigned int available_behaviours, const char *buf);
728+
#else
729+
static inline
730+
ssize_t power_supply_charge_behaviour_show(struct device *dev,
731+
unsigned int available_behaviours,
732+
enum power_supply_charge_behaviour behaviour,
733+
char *buf)
734+
{
735+
return -EOPNOTSUPP;
736+
}
737+
738+
static inline int power_supply_charge_behaviour_parse(unsigned int available_behaviours,
739+
const char *buf)
740+
{
741+
return -EOPNOTSUPP;
742+
}
728743
#endif
729744

730745
#endif /* __LINUX_POWER_SUPPLY_H__ */

0 commit comments

Comments
 (0)