diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-15 10:18:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-15 10:18:36 -0700 |
commit | 5a2b3ef4559f3d0ef58cbfb723f528f1c6b2e601 (patch) | |
tree | 3421b2051cec89dcdf98b71f100837698f149ade | |
parent | c9192798b9318a4b3f96c41ae27805cc8b46b7ee (diff) | |
parent | 1c8cf9c997a4a6b36e907c7ede5f048aeaab1644 (diff) | |
download | linux-5a2b3ef4559f3d0ef58cbfb723f528f1c6b2e601.tar.gz linux-5a2b3ef4559f3d0ef58cbfb723f528f1c6b2e601.tar.bz2 linux-5a2b3ef4559f3d0ef58cbfb723f528f1c6b2e601.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
mmc: sdio: fix SDIO suspend/resume regression
-rw-r--r-- | drivers/mmc/core/core.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 5db49b124ffa..09eee6df0653 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1631,6 +1631,19 @@ int mmc_suspend_host(struct mmc_host *host) if (host->bus_ops && !host->bus_dead) { if (host->bus_ops->suspend) err = host->bus_ops->suspend(host); + if (err == -ENOSYS || !host->bus_ops->resume) { + /* + * We simply "remove" the card in this case. + * It will be redetected on resume. + */ + if (host->bus_ops->remove) + host->bus_ops->remove(host); + mmc_claim_host(host); + mmc_detach_bus(host); + mmc_release_host(host); + host->pm_flags = 0; + err = 0; + } } mmc_bus_put(host); |