diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2010-10-07 14:39:16 -0700 |
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2012-04-09 13:57:44 -0700 |
| commit | 73ae60c90edb8973080b4ca5d82cc9a1ad1e17d4 (patch) | |
| tree | 8f600933fd3a8f31066f2f9ae470ca5c56289415 | |
| parent | fe6271ebd85b3e4deb44b109bce9c2a3438ddea4 (diff) | |
mmc: Add "ignore mmc pm notify" functionality
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
| -rw-r--r-- | drivers/mmc/core/host.c | 7 | ||||
| -rw-r--r-- | include/linux/mmc/pm.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 91c84c7a182..80f0176ca18 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -381,7 +381,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; } @@ -398,7 +399,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 diff --git a/include/linux/mmc/pm.h b/include/linux/mmc/pm.h index 4a139204c20..6e2d6a135c7 100644 --- a/include/linux/mmc/pm.h +++ b/include/linux/mmc/pm.h @@ -26,5 +26,6 @@ typedef unsigned int mmc_pm_flag_t; #define MMC_PM_KEEP_POWER (1 << 0) /* preserve card power during suspend */ #define MMC_PM_WAKE_SDIO_IRQ (1 << 1) /* wake up host system on SDIO IRQ assertion */ +#define MMC_PM_IGNORE_PM_NOTIFY (1 << 2) /* ignore mmc pm notify */ #endif /* LINUX_MMC_PM_H */ |
