diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-04 21:05:33 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-04 21:05:33 -0500 |
commit | 162d6f98005fce408efc5af73956c434ae08ef73 (patch) | |
tree | 4a5d0ce7fb774bd3a88c5e45ce6ea016df616f2d | |
parent | 48bb9fe4b3b361570f3619086a22d9bf9dd4c980 (diff) |
MMC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.
Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
drivers/mmc/.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/core/bus.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-acpi.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 18 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-pxav3.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-s3c.c | 6 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 7 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.h | 3 |
8 files changed, 18 insertions, 28 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 8a1f1240e058..6c0613d56b77 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c | |||
@@ -179,7 +179,7 @@ static int mmc_bus_resume(struct device *dev) | |||
179 | } | 179 | } |
180 | #endif | 180 | #endif |
181 | 181 | ||
182 | #ifdef CONFIG_PM_RUNTIME | 182 | #ifdef CONFIG_PM |
183 | static int mmc_runtime_suspend(struct device *dev) | 183 | static int mmc_runtime_suspend(struct device *dev) |
184 | { | 184 | { |
185 | struct mmc_card *card = mmc_dev_to_card(dev); | 185 | struct mmc_card *card = mmc_dev_to_card(dev); |
@@ -195,7 +195,7 @@ static int mmc_runtime_resume(struct device *dev) | |||
195 | 195 | ||
196 | return host->bus_ops->runtime_resume(host); | 196 | return host->bus_ops->runtime_resume(host); |
197 | } | 197 | } |
198 | #endif /* !CONFIG_PM_RUNTIME */ | 198 | #endif /* !CONFIG_PM */ |
199 | 199 | ||
200 | static const struct dev_pm_ops mmc_bus_pm_ops = { | 200 | static const struct dev_pm_ops mmc_bus_pm_ops = { |
201 | SET_RUNTIME_PM_OPS(mmc_runtime_suspend, mmc_runtime_resume, NULL) | 201 | SET_RUNTIME_PM_OPS(mmc_runtime_suspend, mmc_runtime_resume, NULL) |
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 9cccc0e89b04..a804e8dc57e3 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c | |||
@@ -416,7 +416,7 @@ static int sdhci_acpi_resume(struct device *dev) | |||
416 | 416 | ||
417 | #endif | 417 | #endif |
418 | 418 | ||
419 | #ifdef CONFIG_PM_RUNTIME | 419 | #ifdef CONFIG_PM |
420 | 420 | ||
421 | static int sdhci_acpi_runtime_suspend(struct device *dev) | 421 | static int sdhci_acpi_runtime_suspend(struct device *dev) |
422 | { | 422 | { |
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 587ee0edeb57..cafa10c10893 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c | |||
@@ -1172,7 +1172,7 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev) | |||
1172 | pm_runtime_dont_use_autosuspend(&pdev->dev); | 1172 | pm_runtime_dont_use_autosuspend(&pdev->dev); |
1173 | pm_runtime_disable(&pdev->dev); | 1173 | pm_runtime_disable(&pdev->dev); |
1174 | 1174 | ||
1175 | if (!IS_ENABLED(CONFIG_PM_RUNTIME)) { | 1175 | if (!IS_ENABLED(CONFIG_PM)) { |
1176 | clk_disable_unprepare(imx_data->clk_per); | 1176 | clk_disable_unprepare(imx_data->clk_per); |
1177 | clk_disable_unprepare(imx_data->clk_ipg); | 1177 | clk_disable_unprepare(imx_data->clk_ipg); |
1178 | clk_disable_unprepare(imx_data->clk_ahb); | 1178 | clk_disable_unprepare(imx_data->clk_ahb); |
@@ -1183,7 +1183,7 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev) | |||
1183 | return 0; | 1183 | return 0; |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | #ifdef CONFIG_PM_RUNTIME | 1186 | #ifdef CONFIG_PM |
1187 | static int sdhci_esdhc_runtime_suspend(struct device *dev) | 1187 | static int sdhci_esdhc_runtime_suspend(struct device *dev) |
1188 | { | 1188 | { |
1189 | struct sdhci_host *host = dev_get_drvdata(dev); | 1189 | struct sdhci_host *host = dev_get_drvdata(dev); |
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 61192973e7cb..de32a09b46d6 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c | |||
@@ -134,7 +134,7 @@ static int pch_hc_probe_slot(struct sdhci_pci_slot *slot) | |||
134 | return 0; | 134 | return 0; |
135 | } | 135 | } |
136 | 136 | ||
137 | #ifdef CONFIG_PM_RUNTIME | 137 | #ifdef CONFIG_PM |
138 | 138 | ||
139 | static irqreturn_t sdhci_pci_sd_cd(int irq, void *dev_id) | 139 | static irqreturn_t sdhci_pci_sd_cd(int irq, void *dev_id) |
140 | { | 140 | { |
@@ -1230,15 +1230,6 @@ static int sdhci_pci_resume(struct device *dev) | |||
1230 | return 0; | 1230 | return 0; |
1231 | } | 1231 | } |
1232 | 1232 | ||
1233 | #else /* CONFIG_PM */ | ||
1234 | |||
1235 | #define sdhci_pci_suspend NULL | ||
1236 | #define sdhci_pci_resume NULL | ||
1237 | |||
1238 | #endif /* CONFIG_PM */ | ||
1239 | |||
1240 | #ifdef CONFIG_PM_RUNTIME | ||
1241 | |||
1242 | static int sdhci_pci_runtime_suspend(struct device *dev) | 1233 | static int sdhci_pci_runtime_suspend(struct device *dev) |
1243 | { | 1234 | { |
1244 | struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); | 1235 | struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); |
@@ -1310,7 +1301,12 @@ static int sdhci_pci_runtime_idle(struct device *dev) | |||
1310 | return 0; | 1301 | return 0; |
1311 | } | 1302 | } |
1312 | 1303 | ||
1313 | #endif | 1304 | #else /* CONFIG_PM */ |
1305 | |||
1306 | #define sdhci_pci_suspend NULL | ||
1307 | #define sdhci_pci_resume NULL | ||
1308 | |||
1309 | #endif /* CONFIG_PM */ | ||
1314 | 1310 | ||
1315 | static const struct dev_pm_ops sdhci_pci_pm_ops = { | 1311 | static const struct dev_pm_ops sdhci_pci_pm_ops = { |
1316 | .suspend = sdhci_pci_suspend, | 1312 | .suspend = sdhci_pci_suspend, |
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index 5036d7d39529..88cf1ef970fe 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c | |||
@@ -436,7 +436,7 @@ static int sdhci_pxav3_resume(struct device *dev) | |||
436 | } | 436 | } |
437 | #endif | 437 | #endif |
438 | 438 | ||
439 | #ifdef CONFIG_PM_RUNTIME | 439 | #ifdef CONFIG_PM |
440 | static int sdhci_pxav3_runtime_suspend(struct device *dev) | 440 | static int sdhci_pxav3_runtime_suspend(struct device *dev) |
441 | { | 441 | { |
442 | struct sdhci_host *host = dev_get_drvdata(dev); | 442 | struct sdhci_host *host = dev_get_drvdata(dev); |
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 0ce6eb17deaf..fbf50efe6288 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c | |||
@@ -609,7 +609,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev) | |||
609 | goto err_req_regs; | 609 | goto err_req_regs; |
610 | } | 610 | } |
611 | 611 | ||
612 | #ifdef CONFIG_PM_RUNTIME | 612 | #ifdef CONFIG_PM |
613 | if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL) | 613 | if (pdata->cd_type != S3C_SDHCI_CD_INTERNAL) |
614 | clk_disable_unprepare(sc->clk_io); | 614 | clk_disable_unprepare(sc->clk_io); |
615 | #endif | 615 | #endif |
@@ -635,7 +635,7 @@ static int sdhci_s3c_remove(struct platform_device *pdev) | |||
635 | if (sc->ext_cd_irq) | 635 | if (sc->ext_cd_irq) |
636 | free_irq(sc->ext_cd_irq, sc); | 636 | free_irq(sc->ext_cd_irq, sc); |
637 | 637 | ||
638 | #ifdef CONFIG_PM_RUNTIME | 638 | #ifdef CONFIG_PM |
639 | if (sc->pdata->cd_type != S3C_SDHCI_CD_INTERNAL) | 639 | if (sc->pdata->cd_type != S3C_SDHCI_CD_INTERNAL) |
640 | clk_prepare_enable(sc->clk_io); | 640 | clk_prepare_enable(sc->clk_io); |
641 | #endif | 641 | #endif |
@@ -667,7 +667,7 @@ static int sdhci_s3c_resume(struct device *dev) | |||
667 | } | 667 | } |
668 | #endif | 668 | #endif |
669 | 669 | ||
670 | #ifdef CONFIG_PM_RUNTIME | 670 | #ifdef CONFIG_PM |
671 | static int sdhci_s3c_runtime_suspend(struct device *dev) | 671 | static int sdhci_s3c_runtime_suspend(struct device *dev) |
672 | { | 672 | { |
673 | struct sdhci_host *host = dev_get_drvdata(dev); | 673 | struct sdhci_host *host = dev_get_drvdata(dev); |
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index ada1a3ea3a87..640e82c40ee9 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -56,7 +56,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode); | |||
56 | static void sdhci_tuning_timer(unsigned long data); | 56 | static void sdhci_tuning_timer(unsigned long data); |
57 | static void sdhci_enable_preset_value(struct sdhci_host *host, bool enable); | 57 | static void sdhci_enable_preset_value(struct sdhci_host *host, bool enable); |
58 | 58 | ||
59 | #ifdef CONFIG_PM_RUNTIME | 59 | #ifdef CONFIG_PM |
60 | static int sdhci_runtime_pm_get(struct sdhci_host *host); | 60 | static int sdhci_runtime_pm_get(struct sdhci_host *host); |
61 | static int sdhci_runtime_pm_put(struct sdhci_host *host); | 61 | static int sdhci_runtime_pm_put(struct sdhci_host *host); |
62 | static void sdhci_runtime_pm_bus_on(struct sdhci_host *host); | 62 | static void sdhci_runtime_pm_bus_on(struct sdhci_host *host); |
@@ -2654,9 +2654,6 @@ int sdhci_resume_host(struct sdhci_host *host) | |||
2654 | } | 2654 | } |
2655 | 2655 | ||
2656 | EXPORT_SYMBOL_GPL(sdhci_resume_host); | 2656 | EXPORT_SYMBOL_GPL(sdhci_resume_host); |
2657 | #endif /* CONFIG_PM */ | ||
2658 | |||
2659 | #ifdef CONFIG_PM_RUNTIME | ||
2660 | 2657 | ||
2661 | static int sdhci_runtime_pm_get(struct sdhci_host *host) | 2658 | static int sdhci_runtime_pm_get(struct sdhci_host *host) |
2662 | { | 2659 | { |
@@ -2757,7 +2754,7 @@ int sdhci_runtime_resume_host(struct sdhci_host *host) | |||
2757 | } | 2754 | } |
2758 | EXPORT_SYMBOL_GPL(sdhci_runtime_resume_host); | 2755 | EXPORT_SYMBOL_GPL(sdhci_runtime_resume_host); |
2759 | 2756 | ||
2760 | #endif | 2757 | #endif /* CONFIG_PM */ |
2761 | 2758 | ||
2762 | /*****************************************************************************\ | 2759 | /*****************************************************************************\ |
2763 | * * | 2760 | * * |
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 31896a779d4e..912b260f9d2c 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h | |||
@@ -411,9 +411,6 @@ void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing); | |||
411 | extern int sdhci_suspend_host(struct sdhci_host *host); | 411 | extern int sdhci_suspend_host(struct sdhci_host *host); |
412 | extern int sdhci_resume_host(struct sdhci_host *host); | 412 | extern int sdhci_resume_host(struct sdhci_host *host); |
413 | extern void sdhci_enable_irq_wakeups(struct sdhci_host *host); | 413 | extern void sdhci_enable_irq_wakeups(struct sdhci_host *host); |
414 | #endif | ||
415 | |||
416 | #ifdef CONFIG_PM_RUNTIME | ||
417 | extern int sdhci_runtime_suspend_host(struct sdhci_host *host); | 414 | extern int sdhci_runtime_suspend_host(struct sdhci_host *host); |
418 | extern int sdhci_runtime_resume_host(struct sdhci_host *host); | 415 | extern int sdhci_runtime_resume_host(struct sdhci_host *host); |
419 | #endif | 416 | #endif |