diff options
| -rw-r--r-- | drivers/mmc/core/host.c | 11 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-cns3xxx.c | 5 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-dove.c | 5 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 5 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-of-esdhc.c | 5 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-of-hlwd.c | 5 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 26 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-pltfm.c | 18 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-pltfm.h | 6 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-pxav2.c | 5 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-pxav3.c | 5 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-s3c.c | 21 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci-tegra.c | 5 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci.c | 2 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci.h | 2 | ||||
| -rw-r--r-- | drivers/mmc/host/vub300.c | 2 |
16 files changed, 53 insertions, 75 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index e8a5eb38748b..d31c78b72b0f 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
| @@ -302,17 +302,6 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) | |||
| 302 | host->max_blk_size = 512; | 302 | host->max_blk_size = 512; |
| 303 | host->max_blk_count = PAGE_CACHE_SIZE / 512; | 303 | host->max_blk_count = PAGE_CACHE_SIZE / 512; |
| 304 | 304 | ||
| 305 | /* | ||
| 306 | * Enable runtime power management by default. This flag was added due | ||
| 307 | * to runtime power management causing disruption for some users, but | ||
| 308 | * the power on/off code has been improved since then. | ||
| 309 | * | ||
| 310 | * We'll enable this flag by default as an experiment, and if no | ||
| 311 | * problems are reported, we will follow up later and remove the flag | ||
| 312 | * altogether. | ||
| 313 | */ | ||
| 314 | host->caps = MMC_CAP_POWER_OFF_CARD; | ||
| 315 | |||
| 316 | return host; | 305 | return host; |
| 317 | 306 | ||
| 318 | free: | 307 | free: |
diff --git a/drivers/mmc/host/sdhci-cns3xxx.c b/drivers/mmc/host/sdhci-cns3xxx.c index 87b6f079b6e0..b4257e700617 100644 --- a/drivers/mmc/host/sdhci-cns3xxx.c +++ b/drivers/mmc/host/sdhci-cns3xxx.c | |||
| @@ -109,13 +109,10 @@ static struct platform_driver sdhci_cns3xxx_driver = { | |||
| 109 | .driver = { | 109 | .driver = { |
| 110 | .name = "sdhci-cns3xxx", | 110 | .name = "sdhci-cns3xxx", |
| 111 | .owner = THIS_MODULE, | 111 | .owner = THIS_MODULE, |
| 112 | .pm = SDHCI_PLTFM_PMOPS, | ||
| 112 | }, | 113 | }, |
| 113 | .probe = sdhci_cns3xxx_probe, | 114 | .probe = sdhci_cns3xxx_probe, |
| 114 | .remove = __devexit_p(sdhci_cns3xxx_remove), | 115 | .remove = __devexit_p(sdhci_cns3xxx_remove), |
| 115 | #ifdef CONFIG_PM | ||
| 116 | .suspend = sdhci_pltfm_suspend, | ||
| 117 | .resume = sdhci_pltfm_resume, | ||
| 118 | #endif | ||
| 119 | }; | 116 | }; |
| 120 | 117 | ||
| 121 | static int __init sdhci_cns3xxx_init(void) | 118 | static int __init sdhci_cns3xxx_init(void) |
diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c index f2d29dca4420..a81312c91f70 100644 --- a/drivers/mmc/host/sdhci-dove.c +++ b/drivers/mmc/host/sdhci-dove.c | |||
| @@ -82,13 +82,10 @@ static struct platform_driver sdhci_dove_driver = { | |||
| 82 | .driver = { | 82 | .driver = { |
| 83 | .name = "sdhci-dove", | 83 | .name = "sdhci-dove", |
| 84 | .owner = THIS_MODULE, | 84 | .owner = THIS_MODULE, |
| 85 | .pm = SDHCI_PLTFM_PMOPS, | ||
| 85 | }, | 86 | }, |
| 86 | .probe = sdhci_dove_probe, | 87 | .probe = sdhci_dove_probe, |
| 87 | .remove = __devexit_p(sdhci_dove_remove), | 88 | .remove = __devexit_p(sdhci_dove_remove), |
| 88 | #ifdef CONFIG_PM | ||
| 89 | .suspend = sdhci_pltfm_suspend, | ||
| 90 | .resume = sdhci_pltfm_resume, | ||
| 91 | #endif | ||
| 92 | }; | 89 | }; |
| 93 | 90 | ||
| 94 | static int __init sdhci_dove_init(void) | 91 | static int __init sdhci_dove_init(void) |
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 4b976f00ea85..38ebc4ea259f 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c | |||
| @@ -599,14 +599,11 @@ static struct platform_driver sdhci_esdhc_imx_driver = { | |||
| 599 | .name = "sdhci-esdhc-imx", | 599 | .name = "sdhci-esdhc-imx", |
| 600 | .owner = THIS_MODULE, | 600 | .owner = THIS_MODULE, |
| 601 | .of_match_table = imx_esdhc_dt_ids, | 601 | .of_match_table = imx_esdhc_dt_ids, |
| 602 | .pm = SDHCI_PLTFM_PMOPS, | ||
| 602 | }, | 603 | }, |
| 603 | .id_table = imx_esdhc_devtype, | 604 | .id_table = imx_esdhc_devtype, |
| 604 | .probe = sdhci_esdhc_imx_probe, | 605 | .probe = sdhci_esdhc_imx_probe, |
| 605 | .remove = __devexit_p(sdhci_esdhc_imx_remove), | 606 | .remove = __devexit_p(sdhci_esdhc_imx_remove), |
| 606 | #ifdef CONFIG_PM | ||
| 607 | .suspend = sdhci_pltfm_suspend, | ||
| 608 | .resume = sdhci_pltfm_resume, | ||
| 609 | #endif | ||
| 610 | }; | 607 | }; |
| 611 | 608 | ||
| 612 | static int __init sdhci_esdhc_imx_init(void) | 609 | static int __init sdhci_esdhc_imx_init(void) |
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 59e9d003e589..01e5f627e0f0 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c | |||
| @@ -125,13 +125,10 @@ static struct platform_driver sdhci_esdhc_driver = { | |||
| 125 | .name = "sdhci-esdhc", | 125 | .name = "sdhci-esdhc", |
| 126 | .owner = THIS_MODULE, | 126 | .owner = THIS_MODULE, |
| 127 | .of_match_table = sdhci_esdhc_of_match, | 127 | .of_match_table = sdhci_esdhc_of_match, |
| 128 | .pm = SDHCI_PLTFM_PMOPS, | ||
| 128 | }, | 129 | }, |
| 129 | .probe = sdhci_esdhc_probe, | 130 | .probe = sdhci_esdhc_probe, |
| 130 | .remove = __devexit_p(sdhci_esdhc_remove), | 131 | .remove = __devexit_p(sdhci_esdhc_remove), |
| 131 | #ifdef CONFIG_PM | ||
| 132 | .suspend = sdhci_pltfm_suspend, | ||
| 133 | .resume = sdhci_pltfm_resume, | ||
| 134 | #endif | ||
| 135 | }; | 132 | }; |
| 136 | 133 | ||
| 137 | static int __init sdhci_esdhc_init(void) | 134 | static int __init sdhci_esdhc_init(void) |
diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index 9b0d794a4f69..3619adc7d9fc 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers/mmc/host/sdhci-of-hlwd.c | |||
| @@ -87,13 +87,10 @@ static struct platform_driver sdhci_hlwd_driver = { | |||
| 87 | .name = "sdhci-hlwd", | 87 | .name = "sdhci-hlwd", |
| 88 | .owner = THIS_MODULE, | 88 | .owner = THIS_MODULE, |
| 89 | .of_match_table = sdhci_hlwd_of_match, | 89 | .of_match_table = sdhci_hlwd_of_match, |
| 90 | .pm = SDHCI_PLTFM_PMOPS, | ||
| 90 | }, | 91 | }, |
| 91 | .probe = sdhci_hlwd_probe, | 92 | .probe = sdhci_hlwd_probe, |
| 92 | .remove = __devexit_p(sdhci_hlwd_remove), | 93 | .remove = __devexit_p(sdhci_hlwd_remove), |
| 93 | #ifdef CONFIG_PM | ||
| 94 | .suspend = sdhci_pltfm_suspend, | ||
| 95 | .resume = sdhci_pltfm_resume, | ||
| 96 | #endif | ||
| 97 | }; | 94 | }; |
| 98 | 95 | ||
| 99 | static int __init sdhci_hlwd_init(void) | 96 | static int __init sdhci_hlwd_init(void) |
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index d833d9c2f7e3..6878a94626bc 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c | |||
| @@ -54,8 +54,7 @@ struct sdhci_pci_fixes { | |||
| 54 | int (*probe_slot) (struct sdhci_pci_slot *); | 54 | int (*probe_slot) (struct sdhci_pci_slot *); |
| 55 | void (*remove_slot) (struct sdhci_pci_slot *, int); | 55 | void (*remove_slot) (struct sdhci_pci_slot *, int); |
| 56 | 56 | ||
| 57 | int (*suspend) (struct sdhci_pci_chip *, | 57 | int (*suspend) (struct sdhci_pci_chip *); |
| 58 | pm_message_t); | ||
| 59 | int (*resume) (struct sdhci_pci_chip *); | 58 | int (*resume) (struct sdhci_pci_chip *); |
| 60 | }; | 59 | }; |
| 61 | 60 | ||
| @@ -549,7 +548,7 @@ static void jmicron_remove_slot(struct sdhci_pci_slot *slot, int dead) | |||
| 549 | jmicron_enable_mmc(slot->host, 0); | 548 | jmicron_enable_mmc(slot->host, 0); |
| 550 | } | 549 | } |
| 551 | 550 | ||
| 552 | static int jmicron_suspend(struct sdhci_pci_chip *chip, pm_message_t state) | 551 | static int jmicron_suspend(struct sdhci_pci_chip *chip) |
| 553 | { | 552 | { |
| 554 | int i; | 553 | int i; |
| 555 | 554 | ||
| @@ -993,8 +992,9 @@ static struct sdhci_ops sdhci_pci_ops = { | |||
| 993 | 992 | ||
| 994 | #ifdef CONFIG_PM | 993 | #ifdef CONFIG_PM |
| 995 | 994 | ||
| 996 | static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) | 995 | static int sdhci_pci_suspend(struct device *dev) |
| 997 | { | 996 | { |
| 997 | struct pci_dev *pdev = to_pci_dev(dev); | ||
| 998 | struct sdhci_pci_chip *chip; | 998 | struct sdhci_pci_chip *chip; |
| 999 | struct sdhci_pci_slot *slot; | 999 | struct sdhci_pci_slot *slot; |
| 1000 | mmc_pm_flag_t slot_pm_flags; | 1000 | mmc_pm_flag_t slot_pm_flags; |
| @@ -1010,7 +1010,7 @@ static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
| 1010 | if (!slot) | 1010 | if (!slot) |
| 1011 | continue; | 1011 | continue; |
| 1012 | 1012 | ||
| 1013 | ret = sdhci_suspend_host(slot->host, state); | 1013 | ret = sdhci_suspend_host(slot->host); |
| 1014 | 1014 | ||
| 1015 | if (ret) { | 1015 | if (ret) { |
| 1016 | for (i--; i >= 0; i--) | 1016 | for (i--; i >= 0; i--) |
| @@ -1026,7 +1026,7 @@ static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
| 1026 | } | 1026 | } |
| 1027 | 1027 | ||
| 1028 | if (chip->fixes && chip->fixes->suspend) { | 1028 | if (chip->fixes && chip->fixes->suspend) { |
| 1029 | ret = chip->fixes->suspend(chip, state); | 1029 | ret = chip->fixes->suspend(chip); |
| 1030 | if (ret) { | 1030 | if (ret) { |
| 1031 | for (i = chip->num_slots - 1; i >= 0; i--) | 1031 | for (i = chip->num_slots - 1; i >= 0; i--) |
| 1032 | sdhci_resume_host(chip->slots[i]->host); | 1032 | sdhci_resume_host(chip->slots[i]->host); |
| @@ -1042,16 +1042,17 @@ static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
| 1042 | } | 1042 | } |
| 1043 | pci_set_power_state(pdev, PCI_D3hot); | 1043 | pci_set_power_state(pdev, PCI_D3hot); |
| 1044 | } else { | 1044 | } else { |
| 1045 | pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); | 1045 | pci_enable_wake(pdev, PCI_D3hot, 0); |
| 1046 | pci_disable_device(pdev); | 1046 | pci_disable_device(pdev); |
| 1047 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | 1047 | pci_set_power_state(pdev, PCI_D3hot); |
| 1048 | } | 1048 | } |
| 1049 | 1049 | ||
| 1050 | return 0; | 1050 | return 0; |
| 1051 | } | 1051 | } |
| 1052 | 1052 | ||
| 1053 | static int sdhci_pci_resume(struct pci_dev *pdev) | 1053 | static int sdhci_pci_resume(struct device *dev) |
| 1054 | { | 1054 | { |
| 1055 | struct pci_dev *pdev = to_pci_dev(dev); | ||
| 1055 | struct sdhci_pci_chip *chip; | 1056 | struct sdhci_pci_chip *chip; |
| 1056 | struct sdhci_pci_slot *slot; | 1057 | struct sdhci_pci_slot *slot; |
| 1057 | int i, ret; | 1058 | int i, ret; |
| @@ -1099,7 +1100,6 @@ static int sdhci_pci_runtime_suspend(struct device *dev) | |||
| 1099 | struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); | 1100 | struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); |
| 1100 | struct sdhci_pci_chip *chip; | 1101 | struct sdhci_pci_chip *chip; |
| 1101 | struct sdhci_pci_slot *slot; | 1102 | struct sdhci_pci_slot *slot; |
| 1102 | pm_message_t state = { .event = PM_EVENT_SUSPEND }; | ||
| 1103 | int i, ret; | 1103 | int i, ret; |
| 1104 | 1104 | ||
| 1105 | chip = pci_get_drvdata(pdev); | 1105 | chip = pci_get_drvdata(pdev); |
| @@ -1121,7 +1121,7 @@ static int sdhci_pci_runtime_suspend(struct device *dev) | |||
| 1121 | } | 1121 | } |
| 1122 | 1122 | ||
| 1123 | if (chip->fixes && chip->fixes->suspend) { | 1123 | if (chip->fixes && chip->fixes->suspend) { |
| 1124 | ret = chip->fixes->suspend(chip, state); | 1124 | ret = chip->fixes->suspend(chip); |
| 1125 | if (ret) { | 1125 | if (ret) { |
| 1126 | for (i = chip->num_slots - 1; i >= 0; i--) | 1126 | for (i = chip->num_slots - 1; i >= 0; i--) |
| 1127 | sdhci_runtime_resume_host(chip->slots[i]->host); | 1127 | sdhci_runtime_resume_host(chip->slots[i]->host); |
| @@ -1176,6 +1176,8 @@ static int sdhci_pci_runtime_idle(struct device *dev) | |||
| 1176 | #endif | 1176 | #endif |
| 1177 | 1177 | ||
| 1178 | static const struct dev_pm_ops sdhci_pci_pm_ops = { | 1178 | static const struct dev_pm_ops sdhci_pci_pm_ops = { |
| 1179 | .suspend = sdhci_pci_suspend, | ||
| 1180 | .resume = sdhci_pci_resume, | ||
| 1179 | .runtime_suspend = sdhci_pci_runtime_suspend, | 1181 | .runtime_suspend = sdhci_pci_runtime_suspend, |
| 1180 | .runtime_resume = sdhci_pci_runtime_resume, | 1182 | .runtime_resume = sdhci_pci_runtime_resume, |
| 1181 | .runtime_idle = sdhci_pci_runtime_idle, | 1183 | .runtime_idle = sdhci_pci_runtime_idle, |
| @@ -1428,8 +1430,6 @@ static struct pci_driver sdhci_driver = { | |||
| 1428 | .id_table = pci_ids, | 1430 | .id_table = pci_ids, |
| 1429 | .probe = sdhci_pci_probe, | 1431 | .probe = sdhci_pci_probe, |
| 1430 | .remove = __devexit_p(sdhci_pci_remove), | 1432 | .remove = __devexit_p(sdhci_pci_remove), |
| 1431 | .suspend = sdhci_pci_suspend, | ||
| 1432 | .resume = sdhci_pci_resume, | ||
| 1433 | .driver = { | 1433 | .driver = { |
| 1434 | .pm = &sdhci_pci_pm_ops | 1434 | .pm = &sdhci_pci_pm_ops |
| 1435 | }, | 1435 | }, |
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index a9e12ea05583..03970bcb3495 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c | |||
| @@ -194,21 +194,25 @@ int sdhci_pltfm_unregister(struct platform_device *pdev) | |||
| 194 | EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); | 194 | EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); |
| 195 | 195 | ||
| 196 | #ifdef CONFIG_PM | 196 | #ifdef CONFIG_PM |
| 197 | int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state) | 197 | static int sdhci_pltfm_suspend(struct device *dev) |
| 198 | { | 198 | { |
| 199 | struct sdhci_host *host = platform_get_drvdata(dev); | 199 | struct sdhci_host *host = dev_get_drvdata(dev); |
| 200 | 200 | ||
| 201 | return sdhci_suspend_host(host, state); | 201 | return sdhci_suspend_host(host); |
| 202 | } | 202 | } |
| 203 | EXPORT_SYMBOL_GPL(sdhci_pltfm_suspend); | ||
| 204 | 203 | ||
| 205 | int sdhci_pltfm_resume(struct platform_device *dev) | 204 | static int sdhci_pltfm_resume(struct device *dev) |
| 206 | { | 205 | { |
| 207 | struct sdhci_host *host = platform_get_drvdata(dev); | 206 | struct sdhci_host *host = dev_get_drvdata(dev); |
| 208 | 207 | ||
| 209 | return sdhci_resume_host(host); | 208 | return sdhci_resume_host(host); |
| 210 | } | 209 | } |
| 211 | EXPORT_SYMBOL_GPL(sdhci_pltfm_resume); | 210 | |
| 211 | const struct dev_pm_ops sdhci_pltfm_pmops = { | ||
| 212 | .suspend = sdhci_pltfm_suspend, | ||
| 213 | .resume = sdhci_pltfm_resume, | ||
| 214 | }; | ||
| 215 | EXPORT_SYMBOL_GPL(sdhci_pltfm_pmops); | ||
| 212 | #endif /* CONFIG_PM */ | 216 | #endif /* CONFIG_PM */ |
| 213 | 217 | ||
| 214 | static int __init sdhci_pltfm_drv_init(void) | 218 | static int __init sdhci_pltfm_drv_init(void) |
diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 3a9fc3f40840..37e0e184a0bb 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h | |||
| @@ -99,8 +99,10 @@ extern int sdhci_pltfm_register(struct platform_device *pdev, | |||
| 99 | extern int sdhci_pltfm_unregister(struct platform_device *pdev); | 99 | extern int sdhci_pltfm_unregister(struct platform_device *pdev); |
| 100 | 100 | ||
| 101 | #ifdef CONFIG_PM | 101 | #ifdef CONFIG_PM |
| 102 | extern int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state); | 102 | extern const struct dev_pm_ops sdhci_pltfm_pmops; |
| 103 | extern int sdhci_pltfm_resume(struct platform_device *dev); | 103 | #define SDHCI_PLTFM_PMOPS (&sdhci_pltfm_pmops) |
| 104 | #else | ||
| 105 | #define SDHCI_PLTFM_PMOPS NULL | ||
| 104 | #endif | 106 | #endif |
| 105 | 107 | ||
| 106 | #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */ | 108 | #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */ |
diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c index d4bf6d30c7ba..7a039c3cb1f1 100644 --- a/drivers/mmc/host/sdhci-pxav2.c +++ b/drivers/mmc/host/sdhci-pxav2.c | |||
| @@ -218,13 +218,10 @@ static struct platform_driver sdhci_pxav2_driver = { | |||
| 218 | .driver = { | 218 | .driver = { |
| 219 | .name = "sdhci-pxav2", | 219 | .name = "sdhci-pxav2", |
| 220 | .owner = THIS_MODULE, | 220 | .owner = THIS_MODULE, |
| 221 | .pm = SDHCI_PLTFM_PMOPS, | ||
| 221 | }, | 222 | }, |
| 222 | .probe = sdhci_pxav2_probe, | 223 | .probe = sdhci_pxav2_probe, |
| 223 | .remove = __devexit_p(sdhci_pxav2_remove), | 224 | .remove = __devexit_p(sdhci_pxav2_remove), |
| 224 | #ifdef CONFIG_PM | ||
| 225 | .suspend = sdhci_pltfm_suspend, | ||
| 226 | .resume = sdhci_pltfm_resume, | ||
| 227 | #endif | ||
| 228 | }; | 225 | }; |
| 229 | static int __init sdhci_pxav2_init(void) | 226 | static int __init sdhci_pxav2_init(void) |
| 230 | { | 227 | { |
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index cff4ad3e7a59..15673a7ee6a5 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c | |||
| @@ -264,13 +264,10 @@ static struct platform_driver sdhci_pxav3_driver = { | |||
| 264 | .driver = { | 264 | .driver = { |
| 265 | .name = "sdhci-pxav3", | 265 | .name = "sdhci-pxav3", |
| 266 | .owner = THIS_MODULE, | 266 | .owner = THIS_MODULE, |
| 267 | .pm = SDHCI_PLTFM_PMOPS, | ||
| 267 | }, | 268 | }, |
| 268 | .probe = sdhci_pxav3_probe, | 269 | .probe = sdhci_pxav3_probe, |
| 269 | .remove = __devexit_p(sdhci_pxav3_remove), | 270 | .remove = __devexit_p(sdhci_pxav3_remove), |
| 270 | #ifdef CONFIG_PM | ||
| 271 | .suspend = sdhci_pltfm_suspend, | ||
| 272 | .resume = sdhci_pltfm_resume, | ||
| 273 | #endif | ||
| 274 | }; | 271 | }; |
| 275 | static int __init sdhci_pxav3_init(void) | 272 | static int __init sdhci_pxav3_init(void) |
| 276 | { | 273 | { |
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index cb60c4197e0a..0d33ff0d67fb 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c | |||
| @@ -622,23 +622,29 @@ static int __devexit sdhci_s3c_remove(struct platform_device *pdev) | |||
| 622 | 622 | ||
| 623 | #ifdef CONFIG_PM | 623 | #ifdef CONFIG_PM |
| 624 | 624 | ||
| 625 | static int sdhci_s3c_suspend(struct platform_device *dev, pm_message_t pm) | 625 | static int sdhci_s3c_suspend(struct device *dev) |
| 626 | { | 626 | { |
| 627 | struct sdhci_host *host = platform_get_drvdata(dev); | 627 | struct sdhci_host *host = dev_get_drvdata(dev); |
| 628 | 628 | ||
| 629 | return sdhci_suspend_host(host, pm); | 629 | return sdhci_suspend_host(host); |
| 630 | } | 630 | } |
| 631 | 631 | ||
| 632 | static int sdhci_s3c_resume(struct platform_device *dev) | 632 | static int sdhci_s3c_resume(struct device *dev) |
| 633 | { | 633 | { |
| 634 | struct sdhci_host *host = platform_get_drvdata(dev); | 634 | struct sdhci_host *host = dev_get_drvdata(dev); |
| 635 | 635 | ||
| 636 | return sdhci_resume_host(host); | 636 | return sdhci_resume_host(host); |
| 637 | } | 637 | } |
| 638 | 638 | ||
| 639 | static const struct dev_pm_ops sdhci_s3c_pmops = { | ||
| 640 | .suspend = sdhci_s3c_suspend, | ||
| 641 | .resume = sdhci_s3c_resume, | ||
| 642 | }; | ||
| 643 | |||
| 644 | #define SDHCI_S3C_PMOPS (&sdhci_s3c_pmops) | ||
| 645 | |||
| 639 | #else | 646 | #else |
| 640 | #define sdhci_s3c_suspend NULL | 647 | #define SDHCI_S3C_PMOPS NULL |
| 641 | #define sdhci_s3c_resume NULL | ||
| 642 | #endif | 648 | #endif |
| 643 | 649 | ||
| 644 | static struct platform_driver sdhci_s3c_driver = { | 650 | static struct platform_driver sdhci_s3c_driver = { |
| @@ -647,6 +653,7 @@ static struct platform_driver sdhci_s3c_driver = { | |||
| 647 | .driver = { | 653 | .driver = { |
| 648 | .owner = THIS_MODULE, | 654 | .owner = THIS_MODULE, |
| 649 | .name = "s3c-sdhci", | 655 | .name = "s3c-sdhci", |
| 656 | .pm = SDHCI_S3C_PMOPS, | ||
| 650 | }, | 657 | }, |
| 651 | }; | 658 | }; |
| 652 | 659 | ||
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 89699e861fc1..e2e18d3f949c 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c | |||
| @@ -318,13 +318,10 @@ static struct platform_driver sdhci_tegra_driver = { | |||
| 318 | .name = "sdhci-tegra", | 318 | .name = "sdhci-tegra", |
| 319 | .owner = THIS_MODULE, | 319 | .owner = THIS_MODULE, |
| 320 | .of_match_table = sdhci_tegra_dt_match, | 320 | .of_match_table = sdhci_tegra_dt_match, |
| 321 | .pm = SDHCI_PLTFM_PMOPS, | ||
| 321 | }, | 322 | }, |
| 322 | .probe = sdhci_tegra_probe, | 323 | .probe = sdhci_tegra_probe, |
| 323 | .remove = __devexit_p(sdhci_tegra_remove), | 324 | .remove = __devexit_p(sdhci_tegra_remove), |
| 324 | #ifdef CONFIG_PM | ||
| 325 | .suspend = sdhci_pltfm_suspend, | ||
| 326 | .resume = sdhci_pltfm_resume, | ||
| 327 | #endif | ||
| 328 | }; | 325 | }; |
| 329 | 326 | ||
| 330 | static int __init sdhci_tegra_init(void) | 327 | static int __init sdhci_tegra_init(void) |
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 6d8eea323541..19ed580f2cab 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
| @@ -2327,7 +2327,7 @@ out: | |||
| 2327 | 2327 | ||
| 2328 | #ifdef CONFIG_PM | 2328 | #ifdef CONFIG_PM |
| 2329 | 2329 | ||
| 2330 | int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state) | 2330 | int sdhci_suspend_host(struct sdhci_host *host) |
| 2331 | { | 2331 | { |
| 2332 | int ret; | 2332 | int ret; |
| 2333 | 2333 | ||
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 0a5b65460d8a..a04d4d0c6fd2 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h | |||
| @@ -374,7 +374,7 @@ extern int sdhci_add_host(struct sdhci_host *host); | |||
| 374 | extern void sdhci_remove_host(struct sdhci_host *host, int dead); | 374 | extern void sdhci_remove_host(struct sdhci_host *host, int dead); |
| 375 | 375 | ||
| 376 | #ifdef CONFIG_PM | 376 | #ifdef CONFIG_PM |
| 377 | extern int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state); | 377 | extern int sdhci_suspend_host(struct sdhci_host *host); |
| 378 | extern int sdhci_resume_host(struct sdhci_host *host); | 378 | extern int sdhci_resume_host(struct sdhci_host *host); |
| 379 | extern void sdhci_enable_irq_wakeups(struct sdhci_host *host); | 379 | extern void sdhci_enable_irq_wakeups(struct sdhci_host *host); |
| 380 | #endif | 380 | #endif |
diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c index e8f6e65183d7..2ec978bc32ba 100644 --- a/drivers/mmc/host/vub300.c +++ b/drivers/mmc/host/vub300.c | |||
| @@ -259,7 +259,7 @@ static int firmware_rom_wait_states = 0x04; | |||
| 259 | static int firmware_rom_wait_states = 0x1C; | 259 | static int firmware_rom_wait_states = 0x1C; |
| 260 | #endif | 260 | #endif |
| 261 | 261 | ||
| 262 | module_param(firmware_rom_wait_states, bool, 0644); | 262 | module_param(firmware_rom_wait_states, int, 0644); |
| 263 | MODULE_PARM_DESC(firmware_rom_wait_states, | 263 | MODULE_PARM_DESC(firmware_rom_wait_states, |
| 264 | "ROM wait states byte=RRRIIEEE (Reserved Internal External)"); | 264 | "ROM wait states byte=RRRIIEEE (Reserved Internal External)"); |
| 265 | 265 | ||
