diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2010-10-07 14:39:16 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:38:23 -0800 |
commit | d4c9c578b476a4312a78bcd5e0aa3ce64937edcf (patch) | |
tree | f1bfae2754950e6b381dfbf0bc110f25a8175e4f /drivers/mmc/core | |
parent | 40dc985279093ce4b1f6ffeff13c88e6f2ae8ce7 (diff) |
mmc: Add "ignore mmc pm notify" functionality
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/mmc/core')
-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 793d0a0dad8d..04994bd6e132 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -336,7 +336,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; } @@ -353,7 +354,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 |