Skip to content

Commit 8d28b7a

Browse files
ahunter6storulf
authored andcommitted
mmc: sdhci: Allow override of get_cd() called from sdhci_request()
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+ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent bf60e59 commit 8d28b7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/host/sdhci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
13601360
sdhci_runtime_pm_get(host);
13611361

13621362
/* Firstly check card presence */
1363-
present = sdhci_do_get_cd(host);
1363+
present = mmc->ops->get_cd(mmc);
13641364

13651365
spin_lock_irqsave(&host->lock, flags);
13661366

0 commit comments

Comments
 (0)