From: Chris Ball <cjb@laptop.org>
To: Matt Fleming <matt@console-pimps.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>,
linux-mmc@vger.kernel.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Andrew Morton <akpm@linux-foundation.org>,
Ben Hutchings <ben@decadent.org.uk>,
Yunpeng Gao <yunpeng.gao@intel.com>,
zhangfei gao <zhangfei.gao@gmail.com>
Subject: Re: [PATCH V2 1/2] mmc: Add helper function to check if a card is removable
Date: Mon, 27 Sep 2010 16:01:32 +0100 [thread overview]
Message-ID: <20100927150132.GA11578@void.printf.net> (raw)
In-Reply-To: <1285576940-27587-2-git-send-email-matt@console-pimps.org>
Hi Matt,
On Mon, Sep 27, 2010 at 09:42:19AM +0100, Matt Fleming wrote:
> There are two checks that need to be made when determining whether a
> card is removable. A host controller may set MMC_CAP_NONREMOVABLE if the
> controller does not support removing cards (e.g. eMMC), in which case
> the card is physically non-removable. Also the 'mmc_assume_removable'
> module parameter can be configured at module load time, in which case
> the card may be logically non-removable.
>
> A helper function keeps the logic in one place so that code always
> checks both conditions.
>
> Because this new function is likely to be called from modules we now
> need to export the mmc_assume_removable symbol.
>
> Signed-off-by: Matt Fleming <matt@console-pimps.org>
> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Applied to mmc-next with Wolfram's ACK and the following style change,
thanks very much.
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 23a4864..2e0fe62 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -272,7 +272,7 @@ extern int mmc_assume_removable;
static inline int mmc_card_is_removable(struct mmc_host *host)
{
- return (!(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable);
+ return !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable;
}
#endif
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2010-09-27 15:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 8:42 [PATCH V2 0/2] MMC removable helper function Matt Fleming
2010-09-27 8:42 ` [PATCH V2 1/2] mmc: Add helper function to check if a card is removable Matt Fleming
2010-09-27 10:23 ` Wolfram Sang
2010-09-27 15:01 ` Chris Ball [this message]
2010-09-27 15:02 ` Matt Fleming
2010-09-27 8:42 ` [PATCH V2 2/2] mmc: sdhci: disable MMC_CAP_NEEDS_POLL in nonremovable case Matt Fleming
2010-09-27 10:23 ` Wolfram Sang
2010-09-27 15:02 ` Chris Ball
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=20100927150132.GA11578@void.printf.net \
--to=cjb@laptop.org \
--cc=akpm@linux-foundation.org \
--cc=ben@decadent.org.uk \
--cc=jh80.chung@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=matt@console-pimps.org \
--cc=yunpeng.gao@intel.com \
--cc=zhangfei.gao@gmail.com \
/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 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.