From: Adrian Hunter <adrian.hunter@intel.com>
To: Chris Ball <cjb@laptop.org>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Adrian Hunter <adrian.hunter@intel.com>
Subject: [PATCH V3 2/4] mmc: sdhci: prevent card detection activity for non-removable cards
Date: Fri, 4 Nov 2011 10:16:01 +0200 [thread overview]
Message-ID: <1320394563-29682-3-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1320394563-29682-1-git-send-email-adrian.hunter@intel.com>
Do not enable card detection interrupts for non-removable cards.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/host/sdhci.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 5b01eff..2213366 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -146,10 +146,9 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable)
{
u32 present, irqs;
- if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
- return;
-
- if (host->quirks2 & SDHCI_QUIRK2_OWN_CARD_DETECTION)
+ if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) ||
+ (host->quirks2 & SDHCI_QUIRK2_OWN_CARD_DETECTION) ||
+ !mmc_card_is_removable(host->mmc))
return;
present = sdhci_readl(host, SDHCI_PRESENT_STATE) &
--
1.7.6.4
next prev parent reply other threads:[~2011-11-04 8:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 8:15 [PATCH V3 0/4] mmc: sdhci/sdhci-pci: prepare for wl12xx/SDIO Adrian Hunter
2011-11-04 8:16 ` [PATCH V3 1/4] mmc: sdhci: fix vmmc handling Adrian Hunter
2011-11-04 8:16 ` Adrian Hunter [this message]
2011-11-04 8:16 ` [PATCH V3 3/4] mmc: sdhci-pci: add platform data Adrian Hunter
2011-11-04 8:16 ` [PATCH V3 4/4] mmc: sdhci-pci: get gpio numbers from " Adrian Hunter
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=1320394563-29682-3-git-send-email-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=cjb@laptop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.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