summaryrefslogtreecommitdiffstats
path: root/include/regulator.h
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2020-09-15 11:44:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-09-15 14:42:49 +0200
commit456fbcc4cc0245ab3416ee3e80da83bc6d5d698e (patch)
tree8e912aa2bfc17219c3052a4bc500c6157723a20d /include/regulator.h
parentd97016d3a53e5d9959f1e2b966c7cd0922f6bba3 (diff)
downloadbarebox-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.h5
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;