diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2011-11-20 09:53:36 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-11-20 10:18:05 +0800 |
commit | 2ab602ac738f57ef39b7b250718688aaba9ac21d (patch) | |
tree | 9267ec4188b2e50e74008346ac99b9b73b2f9006 /drivers | |
parent | e6f26cf35bfe7c8f6831023634e24e8e4670fc91 (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 ca2e4f50f61..6e5ad8c32e6 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -347,7 +347,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; } @@ -364,7 +365,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 |