diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/power_supply.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index a9c056f13077..e749d2189335 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -816,15 +816,18 @@ struct power_supply_battery_info { int bti_resistance_tolerance; }; +#if IS_ENABLED(CONFIG_POWER_SUPPLY) extern int power_supply_reg_notifier(struct notifier_block *nb); extern void power_supply_unreg_notifier(struct notifier_block *nb); -#if IS_ENABLED(CONFIG_POWER_SUPPLY) extern struct power_supply *power_supply_get_by_name(const char *name); extern int __must_check power_supply_get_system_batteries(struct device *dev, struct power_supply ***psys); extern void power_supply_put_system_batteries(struct power_supply **psys, int count); extern void power_supply_put(struct power_supply *psy); #else +static inline int power_supply_reg_notifier(struct notifier_block *nb) +{ return -EOPNOTSUPP; } +static inline void power_supply_unreg_notifier(struct notifier_block *nb) {} static inline void power_supply_put(struct power_supply *psy) {} static inline struct power_supply *power_supply_get_by_name(const char *name) { return NULL; } |
