summaryrefslogtreecommitdiffstats
path: root/include/linux/mmc
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 /include/linux/mmc
parent7b6471a968bf95e8d526393de125df3bc0c6a73a (diff)
downloadblackbird-obmc-linux-8dede18e2e86c8e272cd74e66b0e86872cbe7e02.tar.gz
blackbird-obmc-linux-8dede18e2e86c8e272cd74e66b0e86872cbe7e02.zip
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 'include/linux/mmc')
-rw-r--r--include/linux/mmc/host.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 9b04e717bb86..f39888cf5017 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -212,7 +212,9 @@ struct mmc_host {
u32 ocr_avail_sdio; /* SDIO-specific OCR */
u32 ocr_avail_sd; /* SD-specific OCR */
u32 ocr_avail_mmc; /* MMC-specific OCR */
+#ifdef CONFIG_PM_SLEEP
struct notifier_block pm_notify;
+#endif
u32 max_current_330;
u32 max_current_300;
u32 max_current_180;
@@ -433,8 +435,6 @@ static inline int mmc_regulator_set_vqmmc(struct mmc_host *mmc,
int mmc_regulator_get_supply(struct mmc_host *mmc);
-int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *);
-
static inline int mmc_card_is_removable(struct mmc_host *host)
{
return !(host->caps & MMC_CAP_NONREMOVABLE);
OpenPOWER on IntegriCloud