aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2010-10-07 14:39:16 -0700
committerArve Hjønnevåg <arve@android.com>2013-07-01 13:40:24 -0700
commit3549af216ba41d5bd7028c56418f5beeb4976681 (patch)
treef73800a658bd553a293c3b2d1591ec20f6a5a110 /drivers/mmc/core
parent91ee26ab8aa31dcacf691b6906b98219a3c26d39 (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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 2a3593d9f87d..f5bb7c769c3e 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -511,7 +511,8 @@ int mmc_add_host(struct mmc_host *host)
mmc_host_clk_sysfs_init(host);
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;
}
@@ -528,7 +529,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