diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-06-04 10:46:00 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-04 11:33:39 -0400 |
commit | b14903e10a06347234b387f7364f86aa07252d9f (patch) | |
tree | c75b7cb3aa0693ffd48a8f8821167abeb11d4784 /include/linux | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) |
regulator: add regulator_can_change_voltage stub
When CONFIG_REGULATOR is not set, we cannot call
regulator_can_change_voltage() from a device driver, which results
in a build error like
video/fbdev/omap2/dss/hdmi5.c: In function 'hdmi_init_regulator':
video/fbdev/omap2/dss/hdmi5.c:149:2: error: implicit declaration of function 'regulator_can_change_voltage' [-Werror=implicit-function-declaration]
even for drivers that don't require the regulator API normally.
Such a use was recently added in the omap2+ hdmi driver.
This avoids the problem by adding a static inline function
stub in the API header, as we have for most of the other
regulator functions as well.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/regulator/consumer.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index e530681bea70..d60b92a7fc25 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -391,6 +391,11 @@ static inline void regulator_bulk_free(int num_consumers, | |||
391 | { | 391 | { |
392 | } | 392 | } |
393 | 393 | ||
394 | static inline int regulator_can_change_voltage(struct regulator *regulator) | ||
395 | { | ||
396 | return 0; | ||
397 | } | ||
398 | |||
394 | static inline int regulator_set_voltage(struct regulator *regulator, | 399 | static inline int regulator_set_voltage(struct regulator *regulator, |
395 | int min_uV, int max_uV) | 400 | int min_uV, int max_uV) |
396 | { | 401 | { |