提交 b14903e1 编写于 作者: A Arnd Bergmann 提交者: Mark Brown

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: NArnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 c9eaa447
......@@ -391,6 +391,11 @@ static inline void regulator_bulk_free(int num_consumers,
{
}
static inline int regulator_can_change_voltage(struct regulator *regulator)
{
return 0;
}
static inline int regulator_set_voltage(struct regulator *regulator,
int min_uV, int max_uV)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册