|
@@ -1143,18 +1143,13 @@ static int sdhci_pci_suspend(struct device *dev)
|
|
|
goto err_pci_suspend;
|
|
goto err_pci_suspend;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- pci_save_state(pdev);
|
|
|
|
|
if (pm_flags & MMC_PM_KEEP_POWER) {
|
|
if (pm_flags & MMC_PM_KEEP_POWER) {
|
|
|
- if (pm_flags & MMC_PM_WAKE_SDIO_IRQ) {
|
|
|
|
|
- pci_pme_active(pdev, true);
|
|
|
|
|
- pci_enable_wake(pdev, PCI_D3hot, 1);
|
|
|
|
|
- }
|
|
|
|
|
- pci_set_power_state(pdev, PCI_D3hot);
|
|
|
|
|
- } else {
|
|
|
|
|
- pci_enable_wake(pdev, PCI_D3hot, 0);
|
|
|
|
|
- pci_disable_device(pdev);
|
|
|
|
|
- pci_set_power_state(pdev, PCI_D3hot);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (pm_flags & MMC_PM_WAKE_SDIO_IRQ)
|
|
|
|
|
+ device_init_wakeup(dev, true);
|
|
|
|
|
+ else
|
|
|
|
|
+ device_init_wakeup(dev, false);
|
|
|
|
|
+ } else
|
|
|
|
|
+ device_init_wakeup(dev, false);
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
@@ -1175,12 +1170,6 @@ static int sdhci_pci_resume(struct device *dev)
|
|
|
if (!chip)
|
|
if (!chip)
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
|
- pci_set_power_state(pdev, PCI_D0);
|
|
|
|
|
- pci_restore_state(pdev);
|
|
|
|
|
- ret = pci_enable_device(pdev);
|
|
|
|
|
- if (ret)
|
|
|
|
|
- return ret;
|
|
|
|
|
-
|
|
|
|
|
if (chip->fixes && chip->fixes->resume) {
|
|
if (chip->fixes && chip->fixes->resume) {
|
|
|
ret = chip->fixes->resume(chip);
|
|
ret = chip->fixes->resume(chip);
|
|
|
if (ret)
|
|
if (ret)
|