]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
mmc: sdhci: Convert to use sdio_irq_claimed()
authorUlf Hansson <ulf.hansson@linaro.org>
Sun, 8 Sep 2019 10:12:36 +0000 (12:12 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 11 Sep 2019 14:10:19 +0000 (16:10 +0200)
Instead of keeping track of whether SDIO IRQs have been enabled via an
internal sdhci status flag, avoid the open-coding and convert into using
sdio_irq_claimed().

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h

index 4c4285387b47bdaf7128888fc3bd706f6c26b491..4b297f397326c6e6ea1d3a9f5dbe7c6aeef2c30d 100644 (file)
@@ -2144,11 +2144,6 @@ void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable)
                pm_runtime_get_noresume(host->mmc->parent);
 
        spin_lock_irqsave(&host->lock, flags);
-       if (enable)
-               host->flags |= SDHCI_SDIO_IRQ_ENABLED;
-       else
-               host->flags &= ~SDHCI_SDIO_IRQ_ENABLED;
-
        sdhci_enable_sdio_irq_nolock(host, enable);
        spin_unlock_irqrestore(&host->lock, flags);
 
@@ -3382,7 +3377,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host, int soft_reset)
        host->runtime_suspended = false;
 
        /* Enable SDIO IRQ */
-       if (host->flags & SDHCI_SDIO_IRQ_ENABLED)
+       if (sdio_irq_claimed(mmc))
                sdhci_enable_sdio_irq_nolock(host, true);
 
        /* Enable Card Detection */
index 8effaac61c3ab6dead2f4554304effe41c6ec521..a29c4cd2d92e56a0b919b12c6623ba7e47a5baf9 100644 (file)
@@ -512,7 +512,6 @@ struct sdhci_host {
 #define SDHCI_AUTO_CMD12       (1<<6)  /* Auto CMD12 support */
 #define SDHCI_AUTO_CMD23       (1<<7)  /* Auto CMD23 support */
 #define SDHCI_PV_ENABLED       (1<<8)  /* Preset value enabled */
-#define SDHCI_SDIO_IRQ_ENABLED (1<<9)  /* SDIO irq enabled */
 #define SDHCI_USE_64_BIT_DMA   (1<<12) /* Use 64-bit DMA */
 #define SDHCI_HS400_TUNING     (1<<13) /* Tuning for HS400 */
 #define SDHCI_SIGNALING_330    (1<<14) /* Host is capable of 3.3V signaling */