[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EF18515.9030800@linaro.org>
Date: Wed, 21 Dec 2011 11:04:53 +0400
From: Dmitry Antipov <dmitry.antipov@...aro.org>
To: linaro-dev@...ts.linaro.org
CC: patches@...aro.org, linux-kernel@...r.kernel.org
Subject: [PATCH] regulator: use usleep_range() instead of mdelay()/udelay()
From 00753f3d48c4b6c45c1778c3e37bc9949ed79e77 Mon Sep 17 00:00:00 2001
From: Dmitry Antipov <dmitry.antipov@...aro.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists