From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@ti.com>
Cc: linux-kernel@vger.kernel.org, Axel Lin <axel.lin@gmail.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 1/2] regulator: core: Only delay if we successfully set the voltage
Date: Tue, 26 Jun 2012 11:26:21 +0100 [thread overview]
Message-ID: <1340706382-27297-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
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
next reply other threads:[~2012-06-26 10:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 10:26 Mark Brown [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340706382-27297-1-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=axel.lin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®