In 4-bit mode, SDIO interrupts are only reliable if clocks
are maintained.
So get an extra reference when that is the case.

Signed-off-by: NeilBrown  <n...@brown.name>
---
 drivers/mmc/core/sdio.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 5bc6c7dbbd60..f432b11677bd 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -227,6 +227,9 @@ static int sdio_enable_wide(struct mmc_card *card)
        if (ret)
                return ret;
 
+       /* Interrupts only work in 4bit mode if clocks stay on */
+       if (card->host->caps & MMC_CAP_SDIO_IRQ)
+               pm_runtime_get(card->host->parent);
        return 1;
 }
 
@@ -283,6 +286,8 @@ static int sdio_disable_wide(struct mmc_card *card)
                return ret;
 
        mmc_set_bus_width(card->host, MMC_BUS_WIDTH_1);
+       if (card->host->caps & MMC_CAP_SDIO_IRQ)
+               pm_runtime_put(card->host->parent);
 
        return 0;
 }


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to