linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: use usleep_range() in mmc_delay()
@ 2011-12-21  6:56 Dmitry Antipov
  2011-12-21 11:25 ` Sujit Reddy Thumma
  2012-01-13 13:22 ` Aaro Koskinen
  0 siblings, 2 replies; 7+ messages in thread
From: Dmitry Antipov @ 2011-12-21  6:56 UTC (permalink / raw)
  To: linaro-dev; +Cc: patches, linux-mmc, linux-kernel

 From f447d78db65c6675e69466e8ed08364ff065ac08 Mon Sep 17 00:00:00 2001
From: Dmitry Antipov <dmitry.antipov@linaro.org>
Date: Wed, 21 Dec 2011 10:51:03 +0400
Subject: [PATCH] mmc: use usleep_range() in mmc_delay()

---
  drivers/mmc/core/core.h |    8 ++------
  1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
index 14664f1..a77851e 100644
--- a/drivers/mmc/core/core.h
+++ b/drivers/mmc/core/core.h
@@ -47,12 +47,8 @@ void mmc_power_off(struct mmc_host *host);

  static inline void mmc_delay(unsigned int ms)
  {
-	if (ms < 1000 / HZ) {
-		cond_resched();
-		mdelay(ms);
-	} else {
-		msleep(ms);
-	}
+	unsigned long us = ms * USEC_PER_MSEC;
+	usleep_range(us, us + 1000);
  }

  void mmc_rescan(struct work_struct *work);
-- 
1.7.7.4


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

end of thread, other threads:[~2012-01-13 14:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21  6:56 [PATCH] mmc: use usleep_range() in mmc_delay() Dmitry Antipov
2011-12-21 11:25 ` Sujit Reddy Thumma
2011-12-21 13:05   ` Dmitry Antipov
2011-12-27  4:40     ` Sujit Reddy Thumma
2012-01-13 13:22 ` Aaro Koskinen
2012-01-13 13:51   ` Dmitry Antipov
2012-01-13 14:52     ` Aaro Koskinen

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).