Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
mmc: vub300: fix type of firmware_rom_wait_states module parameter
Revert "mmc: enable runtime PM by default"
mmc: sdhci: remove "state" argument from sdhci_suspend_host

+53 -75
-11
drivers/mmc/core/host.c
··· 302 302 host->max_blk_size = 512; 303 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 305 return host; 317 306 318 307 free:
+1 -4
drivers/mmc/host/sdhci-cns3xxx.c
··· 109 109 .driver = { 110 110 .name = "sdhci-cns3xxx", 111 111 .owner = THIS_MODULE, 112 + .pm = SDHCI_PLTFM_PMOPS, 112 113 }, 113 114 .probe = sdhci_cns3xxx_probe, 114 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 118 static int __init sdhci_cns3xxx_init(void)
+1 -4
drivers/mmc/host/sdhci-dove.c
··· 82 82 .driver = { 83 83 .name = "sdhci-dove", 84 84 .owner = THIS_MODULE, 85 + .pm = SDHCI_PLTFM_PMOPS, 85 86 }, 86 87 .probe = sdhci_dove_probe, 87 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 91 static int __init sdhci_dove_init(void)
+1 -4
drivers/mmc/host/sdhci-esdhc-imx.c
··· 599 599 .name = "sdhci-esdhc-imx", 600 600 .owner = THIS_MODULE, 601 601 .of_match_table = imx_esdhc_dt_ids, 602 + .pm = SDHCI_PLTFM_PMOPS, 602 603 }, 603 604 .id_table = imx_esdhc_devtype, 604 605 .probe = sdhci_esdhc_imx_probe, 605 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 609 static int __init sdhci_esdhc_imx_init(void)
+1 -4
drivers/mmc/host/sdhci-of-esdhc.c
··· 125 125 .name = "sdhci-esdhc", 126 126 .owner = THIS_MODULE, 127 127 .of_match_table = sdhci_esdhc_of_match, 128 + .pm = SDHCI_PLTFM_PMOPS, 128 129 }, 129 130 .probe = sdhci_esdhc_probe, 130 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 134 static int __init sdhci_esdhc_init(void)
+1 -4
drivers/mmc/host/sdhci-of-hlwd.c
··· 87 87 .name = "sdhci-hlwd", 88 88 .owner = THIS_MODULE, 89 89 .of_match_table = sdhci_hlwd_of_match, 90 + .pm = SDHCI_PLTFM_PMOPS, 90 91 }, 91 92 .probe = sdhci_hlwd_probe, 92 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 96 static int __init sdhci_hlwd_init(void)
+13 -13
drivers/mmc/host/sdhci-pci.c
··· 54 54 int (*probe_slot) (struct sdhci_pci_slot *); 55 55 void (*remove_slot) (struct sdhci_pci_slot *, int); 56 56 57 - int (*suspend) (struct sdhci_pci_chip *, 58 - pm_message_t); 57 + int (*suspend) (struct sdhci_pci_chip *); 59 58 int (*resume) (struct sdhci_pci_chip *); 60 59 }; 61 60 ··· 548 549 jmicron_enable_mmc(slot->host, 0); 549 550 } 550 551 551 - static int jmicron_suspend(struct sdhci_pci_chip *chip, pm_message_t state) 552 + static int jmicron_suspend(struct sdhci_pci_chip *chip) 552 553 { 553 554 int i; 554 555 ··· 992 993 993 994 #ifdef CONFIG_PM 994 995 995 - static int sdhci_pci_suspend(struct pci_dev *pdev, pm_message_t state) 996 + static int sdhci_pci_suspend(struct device *dev) 996 997 { 998 + struct pci_dev *pdev = to_pci_dev(dev); 997 999 struct sdhci_pci_chip *chip; 998 1000 struct sdhci_pci_slot *slot; 999 1001 mmc_pm_flag_t slot_pm_flags; ··· 1010 1010 if (!slot) 1011 1011 continue; 1012 1012 1013 - ret = sdhci_suspend_host(slot->host, state); 1013 + ret = sdhci_suspend_host(slot->host); 1014 1014 1015 1015 if (ret) { 1016 1016 for (i--; i >= 0; i--) ··· 1026 1026 } 1027 1027 1028 1028 if (chip->fixes && chip->fixes->suspend) { 1029 - ret = chip->fixes->suspend(chip, state); 1029 + ret = chip->fixes->suspend(chip); 1030 1030 if (ret) { 1031 1031 for (i = chip->num_slots - 1; i >= 0; i--) 1032 1032 sdhci_resume_host(chip->slots[i]->host); ··· 1042 1042 } 1043 1043 pci_set_power_state(pdev, PCI_D3hot); 1044 1044 } else { 1045 - pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); 1045 + pci_enable_wake(pdev, PCI_D3hot, 0); 1046 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 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 1056 struct sdhci_pci_chip *chip; 1056 1057 struct sdhci_pci_slot *slot; 1057 1058 int i, ret; ··· 1100 1099 struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); 1101 1100 struct sdhci_pci_chip *chip; 1102 1101 struct sdhci_pci_slot *slot; 1103 - pm_message_t state = { .event = PM_EVENT_SUSPEND }; 1104 1102 int i, ret; 1105 1103 1106 1104 chip = pci_get_drvdata(pdev); ··· 1121 1121 } 1122 1122 1123 1123 if (chip->fixes && chip->fixes->suspend) { 1124 - ret = chip->fixes->suspend(chip, state); 1124 + ret = chip->fixes->suspend(chip); 1125 1125 if (ret) { 1126 1126 for (i = chip->num_slots - 1; i >= 0; i--) 1127 1127 sdhci_runtime_resume_host(chip->slots[i]->host); ··· 1176 1176 #endif 1177 1177 1178 1178 static const struct dev_pm_ops sdhci_pci_pm_ops = { 1179 + .suspend = sdhci_pci_suspend, 1180 + .resume = sdhci_pci_resume, 1179 1181 .runtime_suspend = sdhci_pci_runtime_suspend, 1180 1182 .runtime_resume = sdhci_pci_runtime_resume, 1181 1183 .runtime_idle = sdhci_pci_runtime_idle, ··· 1430 1428 .id_table = pci_ids, 1431 1429 .probe = sdhci_pci_probe, 1432 1430 .remove = __devexit_p(sdhci_pci_remove), 1433 - .suspend = sdhci_pci_suspend, 1434 - .resume = sdhci_pci_resume, 1435 1431 .driver = { 1436 1432 .pm = &sdhci_pci_pm_ops 1437 1433 },
+11 -7
drivers/mmc/host/sdhci-pltfm.c
··· 194 194 EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); 195 195 196 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 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 216 #endif /* CONFIG_PM */ 213 217 214 218 static int __init sdhci_pltfm_drv_init(void)
+4 -2
drivers/mmc/host/sdhci-pltfm.h
··· 99 99 extern int sdhci_pltfm_unregister(struct platform_device *pdev); 100 100 101 101 #ifdef CONFIG_PM 102 - extern int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t state); 103 - extern int sdhci_pltfm_resume(struct platform_device *dev); 102 + extern const struct dev_pm_ops sdhci_pltfm_pmops; 103 + #define SDHCI_PLTFM_PMOPS (&sdhci_pltfm_pmops) 104 + #else 105 + #define SDHCI_PLTFM_PMOPS NULL 104 106 #endif 105 107 106 108 #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */
+1 -4
drivers/mmc/host/sdhci-pxav2.c
··· 218 218 .driver = { 219 219 .name = "sdhci-pxav2", 220 220 .owner = THIS_MODULE, 221 + .pm = SDHCI_PLTFM_PMOPS, 221 222 }, 222 223 .probe = sdhci_pxav2_probe, 223 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 226 static int __init sdhci_pxav2_init(void) 230 227 {
+1 -4
drivers/mmc/host/sdhci-pxav3.c
··· 264 264 .driver = { 265 265 .name = "sdhci-pxav3", 266 266 .owner = THIS_MODULE, 267 + .pm = SDHCI_PLTFM_PMOPS, 267 268 }, 268 269 .probe = sdhci_pxav3_probe, 269 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 272 static int __init sdhci_pxav3_init(void) 276 273 {
+14 -7
drivers/mmc/host/sdhci-s3c.c
··· 622 622 623 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 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 646 #else 640 - #define sdhci_s3c_suspend NULL 641 - #define sdhci_s3c_resume NULL 647 + #define SDHCI_S3C_PMOPS NULL 642 648 #endif 643 649 644 650 static struct platform_driver sdhci_s3c_driver = { ··· 653 647 .driver = { 654 648 .owner = THIS_MODULE, 655 649 .name = "s3c-sdhci", 650 + .pm = SDHCI_S3C_PMOPS, 656 651 }, 657 652 }; 658 653
+1 -4
drivers/mmc/host/sdhci-tegra.c
··· 318 318 .name = "sdhci-tegra", 319 319 .owner = THIS_MODULE, 320 320 .of_match_table = sdhci_tegra_dt_match, 321 + .pm = SDHCI_PLTFM_PMOPS, 321 322 }, 322 323 .probe = sdhci_tegra_probe, 323 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 327 static int __init sdhci_tegra_init(void)
+1 -1
drivers/mmc/host/sdhci.c
··· 2327 2327 2328 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 2332 int ret; 2333 2333
+1 -1
drivers/mmc/host/sdhci.h
··· 374 374 extern void sdhci_remove_host(struct sdhci_host *host, int dead); 375 375 376 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 378 extern int sdhci_resume_host(struct sdhci_host *host); 379 379 extern void sdhci_enable_irq_wakeups(struct sdhci_host *host); 380 380 #endif
+1 -1
drivers/mmc/host/vub300.c
··· 259 259 static int firmware_rom_wait_states = 0x1C; 260 260 #endif 261 261 262 - module_param(firmware_rom_wait_states, bool, 0644); 262 + module_param(firmware_rom_wait_states, int, 0644); 263 263 MODULE_PARM_DESC(firmware_rom_wait_states, 264 264 "ROM wait states byte=RRRIIEEE (Reserved Internal External)"); 265 265