summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-pci-core.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2017-03-20 19:50:50 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2017-04-24 21:41:38 +0200
commitb7813f0fe9535cd9536102b9ac663a669f9be131 (patch)
tree7cd438564a059d7dd0fba5a6dafeecf6aed9572e /drivers/mmc/host/sdhci-pci-core.c
parent1cb0a58ec70402bab49bdb4c5d152e82fd82200e (diff)
downloadtalos-op-linux-b7813f0fe9535cd9536102b9ac663a669f9be131.tar.gz
talos-op-linux-b7813f0fe9535cd9536102b9ac663a669f9be131.zip
mmc: sdhci-pci: Conditionally compile pm sleep functions
It is confusing to have some parts of suspend / resume under conditional compilation and some parts not. Use conditional compilation everywhere. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Diffstat (limited to 'drivers/mmc/host/sdhci-pci-core.c')
-rw-r--r--drivers/mmc/host/sdhci-pci-core.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 7e8163affb26..47a3965dff4d 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -67,6 +67,7 @@ static int ricoh_mmc_probe_slot(struct sdhci_pci_slot *slot)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
static int ricoh_mmc_resume(struct sdhci_pci_chip *chip)
{
/* Apply a delay to allow controller to settle */
@@ -75,6 +76,7 @@ static int ricoh_mmc_resume(struct sdhci_pci_chip *chip)
msleep(500);
return 0;
}
+#endif
static const struct sdhci_pci_fixes sdhci_ricoh = {
.probe = ricoh_probe,
@@ -85,7 +87,9 @@ static const struct sdhci_pci_fixes sdhci_ricoh = {
static const struct sdhci_pci_fixes sdhci_ricoh_mmc = {
.probe_slot = ricoh_mmc_probe_slot,
+#ifdef CONFIG_PM_SLEEP
.resume = ricoh_mmc_resume,
+#endif
.quirks = SDHCI_QUIRK_32BIT_DMA_ADDR |
SDHCI_QUIRK_CLOCK_BEFORE_RESET |
SDHCI_QUIRK_NO_CARD_NO_RESET |
@@ -751,6 +755,7 @@ static void jmicron_remove_slot(struct sdhci_pci_slot *slot, int dead)
jmicron_enable_mmc(slot->host, 0);
}
+#ifdef CONFIG_PM_SLEEP
static int jmicron_suspend(struct sdhci_pci_chip *chip)
{
int i;
@@ -782,13 +787,16 @@ static int jmicron_resume(struct sdhci_pci_chip *chip)
return 0;
}
+#endif
static const struct sdhci_pci_fixes sdhci_o2 = {
.probe = sdhci_pci_o2_probe,
.quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
.quirks2 = SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD,
.probe_slot = sdhci_pci_o2_probe_slot,
+#ifdef CONFIG_PM_SLEEP
.resume = sdhci_pci_o2_resume,
+#endif
};
static const struct sdhci_pci_fixes sdhci_jmicron = {
@@ -797,8 +805,10 @@ static const struct sdhci_pci_fixes sdhci_jmicron = {
.probe_slot = jmicron_probe_slot,
.remove_slot = jmicron_remove_slot,
+#ifdef CONFIG_PM_SLEEP
.suspend = jmicron_suspend,
.resume = jmicron_resume,
+#endif
};
/* SysKonnect CardBus2SDIO extra registers */
OpenPOWER on IntegriCloud