* [PATCH] regulator: stubs: Make stub regulator_get_voltage() return an error
@ 2012-06-11 12:14 Mark Brown
0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2012-06-11 12:14 UTC (permalink / raw)
To: Liam Girdwood, Guennadi Liakhovetski; +Cc: linux-kernel, Mark Brown
Returning 0 isn't useful, it's not even meaningful if there is a real
regulator there.
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
include/linux/regulator/consumer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index ed05443..bb5b3a2 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -291,7 +291,7 @@ static inline int regulator_set_voltage(struct regulator *regulator,
static inline int regulator_get_voltage(struct regulator *regulator)
{
- return 0;
+ return -EINVAL;
}
static inline int regulator_set_current_limit(struct regulator *regulator,
--
1.7.10
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-11 12:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-11 12:14 [PATCH] regulator: stubs: Make stub regulator_get_voltage() return an error Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®