linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	Russell King <linux@arm.linux.org.uk>
Subject: [PATCH V2 2/4] mmc: sdhci: Allow override of get_cd() called from sdhci_request()
Date: Tue,  9 Feb 2016 16:12:36 +0200	[thread overview]
Message-ID: <1455027158-21564-3-git-send-email-adrian.hunter@intel.com> (raw)
In-Reply-To: <1455027158-21564-1-git-send-email-adrian.hunter@intel.com>

Drivers may need to provide their own get_cd() mmc host op, but
currently the internals of the current op (sdhci_get_cd()) are
provided by sdhci_do_get_cd() which is also called from
sdhci_request().

To allow override of the get_cd functionality, change sdhci_request()
to call ->get_cd() instead of sdhci_do_get_cd().

Note, in the future the call to ->get_cd() will likely be removed
from sdhci_request() since most drivers don't need actually it.
However this change is being done now to facilitate a subsequent
bug fix.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org # v4.4+
---
 drivers/mmc/host/sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 9bfa66df963a..add9fdfd1d8f 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1360,7 +1360,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
 	sdhci_runtime_pm_get(host);
 
 	/* Firstly check card presence */
-	present = sdhci_do_get_cd(host);
+	present = mmc->ops->get_cd(mmc);
 
 	spin_lock_irqsave(&host->lock, flags);
 
-- 
1.9.1


  parent reply	other threads:[~2016-02-09 14:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 14:12 [PATCH V2 0/4] mmc: sdhci: Fix card detect race for Intel BXT/APL Adrian Hunter
2016-02-09 14:12 ` [PATCH V2 1/4] mmc: sdhci: Allow override of mmc host operations Adrian Hunter
2016-02-09 14:12 ` Adrian Hunter [this message]
2016-02-09 14:12 ` [PATCH V2 3/4] mmc: sdhci-pci: Fix card detect race for Intel BXT/APL Adrian Hunter
2016-02-09 14:12 ` [PATCH V2 4/4] mmc: sdhci-acpi: " Adrian Hunter
2016-02-11 10:00 ` [PATCH V2 0/4] mmc: sdhci: " Ulf Hansson
2016-02-11 10:32   ` Adrian Hunter
2016-02-11 10:41     ` Ulf Hansson

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=1455027158-21564-3-git-send-email-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=ulf.hansson@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).