Skip to contentSkip to conversation

:missing definition without config

power supply fuyao 1 participant 1 message Nov 15, 2019

lore
Share & tools
lore

fuyao

author
#0 lore raw

linux-pm:
hi, walk around the power_supply.h file.
call power_supply_get_by_name without the CONFIG_POWER_SUPPLY, cause error.
if we should use:

#ifdef CONFIG_POWER_SUPPLY
extern extern struct power_supply *power_supply_get_by_name(const char *name); #else
static inline struct power_supply * power_supply_get_by_name(const char *name)
{return NULL;}
#endif