diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-07-05 16:29:52 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-07-05 16:29:52 -0600 |
commit | a7711ba1090a5fa1caa6e07182ac4e8e1c0da695 (patch) | |
tree | f5682057d40e557e3816a977fbf9a4762d6716e2 /drivers/pci/pci-driver.c | |
parent | 85a00dd391d2de1e177c5ad8db5672428934ac20 (diff) | |
parent | db288c9c5f9db45610dab3940377625132b4af41 (diff) |
Merge branch 'pci/rafael-pci_set_power_state-rebase' into next
* pci/rafael-pci_set_power_state-rebase:
PCI / PM: restore the original behavior of pci_set_power_state()
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index ca2e4c79a58..1dd1d9dfa17 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -459,16 +459,17 @@ static int pci_restore_standard_config(struct pci_dev *pci_dev) return 0; } +#endif + +#ifdef CONFIG_PM_SLEEP + static void pci_pm_default_resume_early(struct pci_dev *pci_dev) { - pci_restore_standard_config(pci_dev); + pci_power_up(pci_dev); + pci_restore_state(pci_dev); pci_fixup_device(pci_fixup_resume_early, pci_dev); } -#endif - -#ifdef CONFIG_PM_SLEEP - /* * Default "suspend" method for devices that have no driver provided suspend, * or not even a driver at all (second part). @@ -1054,7 +1055,8 @@ static int pci_pm_runtime_resume(struct device *dev) if (!pm || !pm->runtime_resume) return -ENOSYS; - pci_pm_default_resume_early(pci_dev); + pci_restore_standard_config(pci_dev); + pci_fixup_device(pci_fixup_resume_early, pci_dev); __pci_enable_wake(pci_dev, PCI_D0, true, false); pci_fixup_device(pci_fixup_resume, pci_dev); |