diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2011-12-13 01:22:11 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-12-26 16:42:10 +0800 |
commit | b937ce74915a58ac890abcd5d5dc1fb4b12b7694 (patch) | |
tree | 35aac04023bc4ce015447de83aa7fb3441a3cdfa /drivers | |
parent | 83009973f30f221da86a700da56d902d6a058952 (diff) |
mmc: Add "ignore mmc pm notify" functionality
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/core/host.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index d31c78b72b0..a931f1343ad 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -337,7 +337,8 @@ int mmc_add_host(struct mmc_host *host) #endif mmc_start_host(host); - register_pm_notifier(&host->pm_notify); + if (!(host->pm_flags & MMC_PM_IGNORE_PM_NOTIFY)) + register_pm_notifier(&host->pm_notify); return 0; } @@ -354,7 +355,9 @@ EXPORT_SYMBOL(mmc_add_host); */ void mmc_remove_host(struct mmc_host *host) { - unregister_pm_notifier(&host->pm_notify); + if (!(host->pm_flags & MMC_PM_IGNORE_PM_NOTIFY)) + unregister_pm_notifier(&host->pm_notify); + mmc_stop_host(host); #ifdef CONFIG_DEBUG_FS |