mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
7b6471a968
commit
8dede18e2e
4 changed files with 26 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue