diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2020-09-15 11:44:17 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-09-15 14:42:49 +0200 |
commit | 456fbcc4cc0245ab3416ee3e80da83bc6d5d698e (patch) | |
tree | 8e912aa2bfc17219c3052a4bc500c6157723a20d /include/regulator.h | |
parent | d97016d3a53e5d9959f1e2b966c7cd0922f6bba3 (diff) | |
download | barebox-456fbcc4cc0245ab3416ee3e80da83bc6d5d698e.tar.gz barebox-456fbcc4cc0245ab3416ee3e80da83bc6d5d698e.tar.xz |
regulator: provide regulator_get_name() stub for !CONFIG_REGULATOR
Otherwise users of this function run into a link error when regulator
support is compiled out.
Reported-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Tested-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/regulator.h')
-rw-r--r-- | include/regulator.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/regulator.h b/include/regulator.h index 12d8e816cd..a9cb6dedca 100644 --- a/include/regulator.h +++ b/include/regulator.h @@ -175,6 +175,11 @@ static inline struct regulator *regulator_get(struct device_d *dev, const char * return NULL; } +static inline struct regulator *regulator_get_name(const char *name) +{ + return NULL; +} + static inline int regulator_enable(struct regulator *r) { return 0; |