linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] regulator: core.c Only delay when setting voltage requires this
@ 2012-06-14 22:07 Philip Rakity
  2012-06-15 11:19 ` Axel Lin
  2012-06-17 19:50 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Philip Rakity @ 2012-06-14 22:07 UTC (permalink / raw)
  To: linux-kernel, broonie; +Cc: linux-mmc, Philip Rakity

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


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

* Re: [PATCH 2/2] regulator: core.c Only delay when setting voltage requires this
  2012-06-14 22:07 [PATCH 2/2] regulator: core.c Only delay when setting voltage requires this Philip Rakity
@ 2012-06-15 11:19 ` Axel Lin
  2012-06-17 19:50 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Axel Lin @ 2012-06-15 11:19 UTC (permalink / raw)
  To: Philip Rakity; +Cc: linux-kernel, broonie, linux-mmc, Philip Rakity

2012/6/15 Philip Rakity <philipspatches@gmail.com>:
> 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>
Acked-by: Axel Lin <axel.lin@gmail.com>

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

* Re: [PATCH 2/2] regulator: core.c Only delay when setting voltage requires this
  2012-06-14 22:07 [PATCH 2/2] regulator: core.c Only delay when setting voltage requires this Philip Rakity
  2012-06-15 11:19 ` Axel Lin
@ 2012-06-17 19:50 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-06-17 19:50 UTC (permalink / raw)
  To: Philip Rakity; +Cc: linux-kernel, linux-mmc, Philip Rakity

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

On Thu, Jun 14, 2012 at 03:07:56PM -0700, Philip Rakity wrote:
> minor optimization: move delay code to where delay is set and
> thus where it is used vs in the main line path.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-06-17 19:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-14 22:07 [PATCH 2/2] regulator: core.c Only delay when setting voltage requires this Philip Rakity
2012-06-15 11:19 ` Axel Lin
2012-06-17 19:50 ` 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).