mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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: 539b9c94ac
("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>
This commit is contained in:
parent
02fb094594
commit
3367d1bd73
1 changed files with 15 additions and 0 deletions
|
@ -553,6 +553,21 @@ ssize_t power_supply_charge_behaviour_show(struct device *dev,
|
|||
char *buf);
|
||||
|
||||
int power_supply_charge_behaviour_parse(unsigned int available_behaviours, const char *buf);
|
||||
#else
|
||||
static inline
|
||||
ssize_t power_supply_charge_behaviour_show(struct device *dev,
|
||||
unsigned int available_behaviours,
|
||||
enum power_supply_charge_behaviour behaviour,
|
||||
char *buf)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int power_supply_charge_behaviour_parse(unsigned int available_behaviours,
|
||||
const char *buf)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_POWER_SUPPLY_H__ */
|
||||
|
|
Loading…
Reference in a new issue