linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sujit Reddy Thumma <sthumma@codeaurora.org>
To: Dmitry Antipov <dmitry.antipov@linaro.org>
Cc: linaro-dev@lists.linaro.org, patches@linaro.org,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc: use usleep_range() in mmc_delay()
Date: Wed, 21 Dec 2011 16:55:36 +0530	[thread overview]
Message-ID: <4EF1C230.6060005@codeaurora.org> (raw)
In-Reply-To: <4EF18310.6080801@linaro.org>

On 12/21/2011 12:26 PM, Dmitry Antipov wrote:
>  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);

I have posted similar patch some time back. 
http://comments.gmane.org/gmane.linux.ports.arm.msm/2119.

Would you like to comment on that?

Thanks,
Sujit

> }
>
> void mmc_rescan(struct work_struct *work);


  reply	other threads:[~2011-12-21 11:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21  6:56 [PATCH] mmc: use usleep_range() in mmc_delay() Dmitry Antipov
2011-12-21 11:25 ` Sujit Reddy Thumma [this message]
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

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=4EF1C230.6060005@codeaurora.org \
    --to=sthumma@codeaurora.org \
    --cc=dmitry.antipov@linaro.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=patches@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).