From: Philip Rakity <philipspatches@gmail.com>
To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com
Cc: linux-mmc@vger.kernel.org, Philip Rakity <prakity@marvell.com>
Subject: [PATCH 2/2] regulator: core.c Only delay when setting voltage requires this
Date: Thu, 14 Jun 2012 15:07:56 -0700 [thread overview]
Message-ID: <1339711676-3488-1-git-send-email-prakity@marvell.com> (raw)
minor optimization: move delay code to where delay is set and
thus where it is used vs in the main line path.
Signed-off-by: Philip Rakity <prakity@marvell.com>
---
drivers/regulator/core.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 5b04916..4407ed2 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2166,14 +2166,14 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
delay);
delay = 0;
}
- }
- /* Insert any necessary delays */
- if (delay >= 1000) {
- mdelay(delay / 1000);
- udelay(delay % 1000);
- } else if (delay) {
- udelay(delay);
+ /* Insert any necessary delays */
+ if (delay >= 1000) {
+ mdelay(delay / 1000);
+ udelay(delay % 1000);
+ } else if (delay) {
+ udelay(delay);
+ }
}
if (ret == 0 && best_val >= 0)
--
1.7.0.4
next reply other threads:[~2012-06-14 22:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-14 22:07 Philip Rakity [this message]
2012-06-15 11:19 ` Axel Lin
2012-06-17 19:50 ` 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=1339711676-3488-1-git-send-email-prakity@marvell.com \
--to=philipspatches@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=prakity@marvell.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®