regulator: add regulator_can_change_voltage stub
authorArnd Bergmann <arnd@arndb.de>
Wed, 4 Jun 2014 14:46:00 +0000 (16:46 +0200)
committerMark Brown <broonie@linaro.org>
Wed, 4 Jun 2014 15:33:39 +0000 (16:33 +0100)
commitb14903e10a06347234b387f7364f86aa07252d9f
treec75b7cb3aa0693ffd48a8f8821167abeb11d4784
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5
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>
include/linux/regulator/consumer.h