aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/core/sdio.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 3be1571e4a51..f17e0e0bd9d1 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -638,11 +638,29 @@ static int mmc_sdio_resume(struct mmc_host *host)
638 return err; 638 return err;
639} 639}
640 640
641static int mmc_sdio_power_restore(struct mmc_host *host)
642{
643 int ret;
644
645 BUG_ON(!host);
646 BUG_ON(!host->card);
647
648 mmc_claim_host(host);
649 ret = mmc_sdio_init_card(host, host->ocr, host->card,
650 (host->pm_flags & MMC_PM_KEEP_POWER));
651 if (!ret && host->sdio_irqs)
652 mmc_signal_sdio_irq(host);
653 mmc_release_host(host);
654
655 return ret;
656}
657
641static const struct mmc_bus_ops mmc_sdio_ops = { 658static const struct mmc_bus_ops mmc_sdio_ops = {
642 .remove = mmc_sdio_remove, 659 .remove = mmc_sdio_remove,
643 .detect = mmc_sdio_detect, 660 .detect = mmc_sdio_detect,
644 .suspend = mmc_sdio_suspend, 661 .suspend = mmc_sdio_suspend,
645 .resume = mmc_sdio_resume, 662 .resume = mmc_sdio_resume,
663 .power_restore = mmc_sdio_power_restore,
646}; 664};
647 665
648 666