[v2,09/11] mmc: sdhci: Drop redundant check in sdhci_ack_sdio_irq()

Message ID 20190908101236.2802-10-ulf.hansson@linaro.org
State New
Headers show
Series
  • mmc: core: PM fixes/improvements for SDIO IRQs
Related show

Commit Message

Ulf Hansson Sept. 8, 2019, 10:12 a.m.
The sdhci_ack_sdio_irq() is called only when SDIO IRQs are enabled.
Therefore, let's drop the redundant check of the internal
SDHCI_SDIO_IRQ_ENABLED flag and just re-enable the IRQs immediately.

Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

---
 drivers/mmc/host/sdhci.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.17.1

Comments

Adrian Hunter Sept. 9, 2019, 11:19 a.m. | #1
On 8/09/19 1:12 PM, Ulf Hansson wrote:
> The sdhci_ack_sdio_irq() is called only when SDIO IRQs are enabled.

> Therefore, let's drop the redundant check of the internal

> SDHCI_SDIO_IRQ_ENABLED flag and just re-enable the IRQs immediately.

> 

> Reviewed-by: Matthias Kaehlcke <mka@chromium.org>

> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>


Acked-by: Adrian Hunter <adrian.hunter@intel.com>


> ---

>  drivers/mmc/host/sdhci.c | 3 +--

>  1 file changed, 1 insertion(+), 2 deletions(-)

> 

> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c

> index d814dc004bad..efa6cda8c991 100644

> --- a/drivers/mmc/host/sdhci.c

> +++ b/drivers/mmc/host/sdhci.c

> @@ -2163,8 +2163,7 @@ static void sdhci_ack_sdio_irq(struct mmc_host *mmc)

>  	unsigned long flags;

>  

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

> -	if (host->flags & SDHCI_SDIO_IRQ_ENABLED)

> -		sdhci_enable_sdio_irq_nolock(host, true);

> +	sdhci_enable_sdio_irq_nolock(host, true);

>  	spin_unlock_irqrestore(&host->lock, flags);

>  }

>  

>

Patch

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index d814dc004bad..efa6cda8c991 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2163,8 +2163,7 @@  static void sdhci_ack_sdio_irq(struct mmc_host *mmc)
 	unsigned long flags;
 
 	spin_lock_irqsave(&host->lock, flags);
-	if (host->flags & SDHCI_SDIO_IRQ_ENABLED)
-		sdhci_enable_sdio_irq_nolock(host, true);
+	sdhci_enable_sdio_irq_nolock(host, true);
 	spin_unlock_irqrestore(&host->lock, flags);
 }