diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2018-02-27 14:51:24 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-03-05 13:04:32 +0100 |
commit | d5d568fad9a52ac4eba5d9a080a5cddb8498fa5e (patch) | |
tree | 822d89a7a03b8835613e4ac514abe02d562cdff7 /drivers/mmc | |
parent | 9c316b38b7801e5dabfc41ab700a0caf743e38b4 (diff) | |
download | linux-stable-d5d568fad9a52ac4eba5d9a080a5cddb8498fa5e.tar.gz linux-stable-d5d568fad9a52ac4eba5d9a080a5cddb8498fa5e.tar.bz2 linux-stable-d5d568fad9a52ac4eba5d9a080a5cddb8498fa5e.zip |
mmc: sdhci: Do not unnecessarily enable wakeup for SDIO card interrupt
Do not enable wakeup for SDIO card interrupt unless the SDIO function
driver has requested it which is indicated by mmc_card_wake_sdio_irq().
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 996845cb5af3..2ededa7f43df 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2928,8 +2928,13 @@ static bool sdhci_enable_irq_wakeups(struct sdhci_host *host) irq_val |= SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE; } - wake_val |= SDHCI_WAKE_ON_INT; - irq_val |= SDHCI_INT_CARD_INT; + if (mmc_card_wake_sdio_irq(host->mmc)) { + wake_val |= SDHCI_WAKE_ON_INT; + irq_val |= SDHCI_INT_CARD_INT; + } + + if (!irq_val) + return false; val = sdhci_readb(host, SDHCI_WAKE_UP_CONTROL); val &= ~mask; |