* [PATCH] regulator: use usleep_range() instead of mdelay()/udelay()
@ 2011-12-21 7:04 Dmitry Antipov
2011-12-23 15:31 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Antipov @ 2011-12-21 7:04 UTC (permalink / raw)
To: linaro-dev; +Cc: patches, linux-kernel
From 00753f3d48c4b6c45c1778c3e37bc9949ed79e77 Mon Sep 17 00:00:00 2001
From: Dmitry Antipov <dmitry.antipov@linaro.org>
Date: Wed, 21 Dec 2011 11:01:42 +0400
Subject: [PATCH] regulator: use usleep_range() instead of mdelay()/udelay()
---
drivers/regulator/core.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 938398f..183ded8 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1379,12 +1379,7 @@ static int _regulator_enable(struct regulator_dev *rdev)
trace_regulator_enable_delay(rdev_get_name(rdev));
- if (delay >= 1000) {
- mdelay(delay / 1000);
- udelay(delay % 1000);
- } else if (delay) {
- udelay(delay);
- }
+ usleep_range(delay, delay + 1000);
trace_regulator_enable_complete(rdev_get_name(rdev));
--
1.7.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] regulator: use usleep_range() instead of mdelay()/udelay()
2011-12-21 7:04 [PATCH] regulator: use usleep_range() instead of mdelay()/udelay() Dmitry Antipov
@ 2011-12-23 15:31 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2011-12-23 15:31 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: linaro-dev, patches, linux-kernel
On Wed, Dec 21, 2011 at 11:04:53AM +0400, Dmitry Antipov wrote:
> From 00753f3d48c4b6c45c1778c3e37bc9949ed79e77 Mon Sep 17 00:00:00 2001
> From: Dmitry Antipov <dmitry.antipov@linaro.org>
> Date: Wed, 21 Dec 2011 11:01:42 +0400
> Subject: [PATCH] regulator: use usleep_range() instead of mdelay()/udelay()
Follow the instructions in Documentation/SubmittingPatches.
> - if (delay >= 1000) {
> - mdelay(delay / 1000);
> - udelay(delay % 1000);
> - } else if (delay) {
> - udelay(delay);
> - }
> + usleep_range(delay, delay + 1000);
These two aren't obviously equivalent in several respects and you
haven't provided any explanation for what you're trying to accomplish.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-23 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 7:04 [PATCH] regulator: use usleep_range() instead of mdelay()/udelay() Dmitry Antipov
2011-12-23 15:31 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.