Loading drivers/mmc/core/bus.c +6 −8 Original line number Diff line number Diff line Loading @@ -413,14 +413,12 @@ int mmc_add_card(struct mmc_card *card) #endif mmc_init_context_info(card->host); if (mmc_use_core_runtime_pm(card->host)) { ret = pm_runtime_set_active(&card->dev); if (ret) pr_err("%s: %s: failed setting runtime active: ret: %d\n", mmc_hostname(card->host), __func__, ret); else if (!mmc_card_sdio(card)) else if (!mmc_card_sdio(card) && mmc_use_core_runtime_pm(card->host)) pm_runtime_enable(&card->dev); } if (mmc_card_sdio(card)) { ret = device_init_wakeup(&card->dev, true); Loading drivers/mmc/core/host.c +9 −11 Original line number Diff line number Diff line Loading @@ -83,9 +83,8 @@ static int mmc_host_suspend(struct device *dev) int ret = 0; unsigned long flags; if (!mmc_use_core_runtime_pm(host)) if (!mmc_use_core_pm(host)) return 0; spin_lock_irqsave(&host->clk_lock, flags); /* * let the driver know that suspend is in progress and must Loading Loading @@ -123,7 +122,7 @@ static int mmc_host_resume(struct device *dev) struct mmc_host *host = cls_dev_to_mmc_host(dev); int ret = 0; if (!mmc_use_core_runtime_pm(host)) if (!mmc_use_core_pm(host)) return 0; if (!pm_runtime_suspended(dev)) { Loading Loading @@ -841,14 +840,13 @@ int mmc_add_host(struct mmc_host *host) WARN_ON((host->caps & MMC_CAP_SDIO_IRQ) && !host->ops->enable_sdio_irq); if (mmc_use_core_runtime_pm(host)) { err = pm_runtime_set_active(&host->class_dev); if (err) pr_err("%s: %s: failed setting runtime active: err: %d\n", mmc_hostname(host), __func__, err); else else if (mmc_use_core_runtime_pm(host)) pm_runtime_enable(&host->class_dev); } err = device_add(&host->class_dev); if (err) return err; Loading include/linux/mmc/host.h +6 −0 Original line number Diff line number Diff line Loading @@ -326,6 +326,7 @@ struct mmc_host { #define MMC_CAP2_HS400_1_8V (1 << 22) /* can support */ #define MMC_CAP2_HS400_1_2V (1 << 23) /* can support */ #define MMC_CAP2_CORE_PM (1 << 24) /* use PM framework */ #define MMC_CAP2_HS400 (MMC_CAP2_HS400_1_8V | \ MMC_CAP2_HS400_1_2V) mmc_pm_flag_t pm_caps; /* supported pm features */ Loading Loading @@ -615,4 +616,9 @@ static inline int mmc_use_core_runtime_pm(struct mmc_host *host) return host->caps2 & MMC_CAP2_CORE_RUNTIME_PM; } static inline int mmc_use_core_pm(struct mmc_host *host) { return host->caps2 & MMC_CAP2_CORE_PM; } #endif /* LINUX_MMC_HOST_H */ Loading
drivers/mmc/core/bus.c +6 −8 Original line number Diff line number Diff line Loading @@ -413,14 +413,12 @@ int mmc_add_card(struct mmc_card *card) #endif mmc_init_context_info(card->host); if (mmc_use_core_runtime_pm(card->host)) { ret = pm_runtime_set_active(&card->dev); if (ret) pr_err("%s: %s: failed setting runtime active: ret: %d\n", mmc_hostname(card->host), __func__, ret); else if (!mmc_card_sdio(card)) else if (!mmc_card_sdio(card) && mmc_use_core_runtime_pm(card->host)) pm_runtime_enable(&card->dev); } if (mmc_card_sdio(card)) { ret = device_init_wakeup(&card->dev, true); Loading
drivers/mmc/core/host.c +9 −11 Original line number Diff line number Diff line Loading @@ -83,9 +83,8 @@ static int mmc_host_suspend(struct device *dev) int ret = 0; unsigned long flags; if (!mmc_use_core_runtime_pm(host)) if (!mmc_use_core_pm(host)) return 0; spin_lock_irqsave(&host->clk_lock, flags); /* * let the driver know that suspend is in progress and must Loading Loading @@ -123,7 +122,7 @@ static int mmc_host_resume(struct device *dev) struct mmc_host *host = cls_dev_to_mmc_host(dev); int ret = 0; if (!mmc_use_core_runtime_pm(host)) if (!mmc_use_core_pm(host)) return 0; if (!pm_runtime_suspended(dev)) { Loading Loading @@ -841,14 +840,13 @@ int mmc_add_host(struct mmc_host *host) WARN_ON((host->caps & MMC_CAP_SDIO_IRQ) && !host->ops->enable_sdio_irq); if (mmc_use_core_runtime_pm(host)) { err = pm_runtime_set_active(&host->class_dev); if (err) pr_err("%s: %s: failed setting runtime active: err: %d\n", mmc_hostname(host), __func__, err); else else if (mmc_use_core_runtime_pm(host)) pm_runtime_enable(&host->class_dev); } err = device_add(&host->class_dev); if (err) return err; Loading
include/linux/mmc/host.h +6 −0 Original line number Diff line number Diff line Loading @@ -326,6 +326,7 @@ struct mmc_host { #define MMC_CAP2_HS400_1_8V (1 << 22) /* can support */ #define MMC_CAP2_HS400_1_2V (1 << 23) /* can support */ #define MMC_CAP2_CORE_PM (1 << 24) /* use PM framework */ #define MMC_CAP2_HS400 (MMC_CAP2_HS400_1_8V | \ MMC_CAP2_HS400_1_2V) mmc_pm_flag_t pm_caps; /* supported pm features */ Loading Loading @@ -615,4 +616,9 @@ static inline int mmc_use_core_runtime_pm(struct mmc_host *host) return host->caps2 & MMC_CAP2_CORE_RUNTIME_PM; } static inline int mmc_use_core_pm(struct mmc_host *host) { return host->caps2 & MMC_CAP2_CORE_PM; } #endif /* LINUX_MMC_HOST_H */