summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-11-16 19:19:30 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-21 10:34:31 +0100
commitad2cfd2e1a54b3971a5192e74d1abc11b54e2f5b (patch)
tree797b91f6905f485a297dff80093872dfdae3917f /include
parentf3f695f0d4bd84d8a217c01b6876b3b40f85464c (diff)
regulator: Fix return value of _set_load() stub
[ Upstream commit f1abf67217de91f5cd3c757ae857632ca565099a ] The stub implementation of _set_load() returns a mode value which is within the bounds of valid return codes for success (the documentation just says that failures are negative error codes) but not sensible or what the actual implementation does. Fix it to just return 0. Reported-by: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/regulator/consumer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 9e0e76992be0..bf62713af290 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -485,7 +485,7 @@ static inline unsigned int regulator_get_mode(struct regulator *regulator)
static inline int regulator_set_load(struct regulator *regulator, int load_uA)
{
- return REGULATOR_MODE_NORMAL;
+ return 0;
}
static inline int regulator_allow_bypass(struct regulator *regulator,