mmc: sdhci: Convert to use sdio_irq_claimed()
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>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user