diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2010-10-13 15:30:28 -0700 |
---|---|---|
committer | Zhang Jiejing <jiejing.zhang@freescale.com> | 2011-11-02 11:13:54 +0800 |
commit | 1a78d5d3711cb578e6390a66cb303fdc09a32e6a (patch) | |
tree | 83bff5b7d0cf2e8606818dde223b5869b24e36a2 /drivers | |
parent | c1d384b4547e461a6a6ba798b6d2781bb449769a (diff) |
mmc: Fix pm_notifier obeying deferred resume
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/core/core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 8cc8a065989e..5f167cad068f 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1383,12 +1383,11 @@ int mmc_pm_notify(struct notifier_block *notify_block, case PM_SUSPEND_PREPARE: spin_lock_irqsave(&host->lock, flags); - host->rescan_disable = 1; if (mmc_bus_needs_resume(host)) { spin_unlock_irqrestore(&host->lock, flags); break; } - + host->rescan_disable = 1; spin_unlock_irqrestore(&host->lock, flags); cancel_delayed_work_sync(&host->detect); @@ -1409,11 +1408,11 @@ int mmc_pm_notify(struct notifier_block *notify_block, case PM_POST_HIBERNATION: spin_lock_irqsave(&host->lock, flags); - host->rescan_disable = 0; if (mmc_bus_needs_resume(host)) { spin_unlock_irqrestore(&host->lock, flags); break; } + host->rescan_disable = 0; spin_unlock_irqrestore(&host->lock, flags); mmc_detect_change(host, 0); |