linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: core: Only delay if we successfully set the voltage
@ 2012-06-26 10:26 Mark Brown
  2012-06-26 10:26 ` [PATCH 2/2] regulator: core: Check that the selector from map_voltage() is valid Mark Brown
  2012-06-26 10:30 ` [PATCH 1/2] regulator: core: Only delay if we successfully set the voltage Axel Lin
  0 siblings, 2 replies; 6+ messages in thread
From: Mark Brown @ 2012-06-26 10:26 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: linux-kernel, Axel Lin, Mark Brown

There is no need to wait for the voltage to ramp if we didn't manage to
set it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/regulator/core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 30ecb49..9f28f2f 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2131,7 +2131,8 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
 		best_val = _regulator_get_voltage(rdev);
 
 	/* Call set_voltage_time_sel if successfully obtained old_selector */
-	if (_regulator_is_enabled(rdev) && ret == 0 && old_selector >= 0 &&
+	if (ret == 0 &&
+	    _regulator_is_enabled(rdev) && ret == 0 && old_selector >= 0 &&
 	    rdev->desc->ops->set_voltage_time_sel) {
 
 		delay = rdev->desc->ops->set_voltage_time_sel(rdev,
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-26 13:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-26 10:26 [PATCH 1/2] regulator: core: Only delay if we successfully set the voltage Mark Brown
2012-06-26 10:26 ` [PATCH 2/2] regulator: core: Check that the selector from map_voltage() is valid Mark Brown
2012-06-26 12:40   ` Axel Lin
2012-06-26 13:13     ` Mark Brown
2012-06-26 10:30 ` [PATCH 1/2] regulator: core: Only delay if we successfully set the voltage Axel Lin
2012-06-26 10:40   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).