summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.h
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2015-11-05 16:11:12 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2015-12-22 11:32:04 +0100
commit8dede18e2e86c8e272cd74e66b0e86872cbe7e02 (patch)
treef1b557366ff4baf7ea10bff82f40e713a0593473 /drivers/mmc/core/core.h
parent7b6471a968bf95e8d526393de125df3bc0c6a73a (diff)
downloadlinux-8dede18e2e86c8e272cd74e66b0e86872cbe7e02.tar.bz2
mmc: core: Refactor code to register the MMC PM notifier
Instead of checking for "#ifdef" directly in the code, let's invent a pair of mmc core functions to deal with register/unregister the MMC PM notifier block. Implement stubs for these functions when CONFIG_PM_SLEEP is unset, as in that case the PM notifiers isn't used. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/core.h')
-rw-r--r--drivers/mmc/core/core.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
index 09241e56d628..bd00ac2cdc1b 100644
--- a/drivers/mmc/core/core.h
+++ b/drivers/mmc/core/core.h
@@ -90,5 +90,13 @@ int mmc_execute_tuning(struct mmc_card *card);
int mmc_hs200_to_hs400(struct mmc_card *card);
int mmc_hs400_to_hs200(struct mmc_card *card);
+#ifdef CONFIG_PM_SLEEP
+void mmc_register_pm_notifier(struct mmc_host *host);
+void mmc_unregister_pm_notifier(struct mmc_host *host);
+#else
+static void mmc_register_pm_notifier(struct mmc_host *host) { }
+static void mmc_unregister_pm_notifier(struct mmc_host *host) { }
+#endif
+
#endif