From: Lan Chunhe <b25806@freescale.com>
To: Kyungmin Park <kmpark@infradead.org>,
Chunhe Lan <Chunhe.Lan@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, kumar.gala@freescale.com,
Chris Ball <cjb@laptop.org>,
linux-mmc@vger.kernel.org, Shengzhou Liu <b36685@freescale.com>
Subject: Re: [PATCH 2/2] mmc: Use mmc_delay() instead of mdelay() for time delay
Date: Fri, 26 Aug 2011 16:45:53 +0800 [thread overview]
Message-ID: <op.v0tbyr18z91x4h@localhost.localdomain> (raw)
In-Reply-To: <CAH9JG2VUA_5c=3LPEvoVmTrYN9WibY87AgEkNgV3uFpAS0euQA@mail.gmail.com>
On Thu, 25 Aug 2011 18:23:35 +0800, Kyungmin Park <kmpark@infradead.org>
wrote:
> On Thu, Aug 25, 2011 at 5:54 PM, Chunhe Lan <Chunhe.Lan@freescale.com>
> wrote:
>> The mmc_delay() is a wrapper function for mdelay() and msleep().
>>
>> o mdelay() -- block the system when busy-waiting.
>> o msleep() -- suspend the currently running task to enable CPU
>> to process other tasks, so it is non-blocking
>> regarding the whole system.
>>
>> When the desired delay time is more than a period of timer interrupt,
>> just use msleep(). Change mdelay() to mmc_delay() to avoid chewing
>> CPU when busy wait.
>>
>> Signed-off-by: Shengzhou Liu <b36685@freescale.com>
>> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
>> Cc: Chris Ball <cjb@laptop.org>
>> ---
>> drivers/mmc/host/sdhci.c | 11 ++++++-----
>> 1 files changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
>> index 0e02cc1..0cb5dc1 100644
>> --- a/drivers/mmc/host/sdhci.c
>> +++ b/drivers/mmc/host/sdhci.c
>> @@ -27,6 +27,7 @@
>> #include <linux/mmc/host.h>
>>
>> #include "sdhci.h"
>> +#include "../core/core.h"
>
> Doesn't better to move the mmc_delay() to "include/linux/mmc/core.h"?
> and include it.
> I think It's not proper include syntax using relative path.
Yes, your suggestion is very good.
I will move the mmc_delay() to "include/linux/mmc/core.h" .
Thanks.
-Jack Lan
> Thank you,
> Kyungmin Park
>>
>> #define DRIVER_NAME "sdhci"
>>
prev parent reply other threads:[~2011-08-26 8:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 8:54 [PATCH 2/2] mmc: Use mmc_delay() instead of mdelay() for time delay Chunhe Lan
2011-08-25 10:23 ` Kyungmin Park
2011-08-26 8:45 ` Lan Chunhe [this message]
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=op.v0tbyr18z91x4h@localhost.localdomain \
--to=b25806@freescale.com \
--cc=Chunhe.Lan@freescale.com \
--cc=b36685@freescale.com \
--cc=cjb@laptop.org \
--cc=kmpark@infradead.org \
--cc=kumar.gala@freescale.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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