diff options
| author | Ulf Hansson <ulf.hansson@linaro.org> | 2015-11-05 10:11:12 -0500 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-12-22 05:32:04 -0500 |
| commit | 8dede18e2e86c8e272cd74e66b0e86872cbe7e02 (patch) | |
| tree | f1b557366ff4baf7ea10bff82f40e713a0593473 /include/linux/mmc | |
| parent | 7b6471a968bf95e8d526393de125df3bc0c6a73a (diff) | |
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.h | 4 |
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 { | |||
| 212 | u32 ocr_avail_sdio; /* SDIO-specific OCR */ | 212 | u32 ocr_avail_sdio; /* SDIO-specific OCR */ |
| 213 | u32 ocr_avail_sd; /* SD-specific OCR */ | 213 | u32 ocr_avail_sd; /* SD-specific OCR */ |
| 214 | u32 ocr_avail_mmc; /* MMC-specific OCR */ | 214 | u32 ocr_avail_mmc; /* MMC-specific OCR */ |
| 215 | #ifdef CONFIG_PM_SLEEP | ||
| 215 | struct notifier_block pm_notify; | 216 | struct notifier_block pm_notify; |
| 217 | #endif | ||
| 216 | u32 max_current_330; | 218 | u32 max_current_330; |
| 217 | u32 max_current_300; | 219 | u32 max_current_300; |
| 218 | u32 max_current_180; | 220 | u32 max_current_180; |
| @@ -433,8 +435,6 @@ static inline int mmc_regulator_set_vqmmc(struct mmc_host *mmc, | |||
| 433 | 435 | ||
| 434 | int mmc_regulator_get_supply(struct mmc_host *mmc); | 436 | int mmc_regulator_get_supply(struct mmc_host *mmc); |
| 435 | 437 | ||
| 436 | int mmc_pm_notify(struct notifier_block *notify_block, unsigned long, void *); | ||
| 437 | |||
| 438 | static inline int mmc_card_is_removable(struct mmc_host *host) | 438 | static inline int mmc_card_is_removable(struct mmc_host *host) |
| 439 | { | 439 | { |
| 440 | return !(host->caps & MMC_CAP_NONREMOVABLE); | 440 | return !(host->caps & MMC_CAP_NONREMOVABLE); |
