]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Clear saved_state after the state has been restored
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 9 Sep 2009 21:49:59 +0000 (23:49 +0200)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 14 Sep 2009 20:41:46 +0000 (13:41 -0700)
commit8bd8f8fda3319a3fb51224f0f21147e04060d25d
tree957f38dc1065e2880197e7ca5ffe1592515010b3
parentf838355825722f022752ec4cef79f11b2163e083
PCI: Clear saved_state after the state has been restored

Some PCI devices fail if their standard configuration registers are
restored twice in a row.  Prevent this from happening by making
pci_restore_state() clear the saved_state flag of the device right
after the device's standard configuration registers have been
populated with the previously saved values.

Simplify PCI PM callbacks by removing the direct clearing of
state_saved from them, as it shouldn't be necessary any more (except
in pci_pm_thaw(), where it has to be cleared, so that the values saved
during the "freeze" phase of hibernation are not used later by mistake).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci-driver.c
drivers/pci/pci.c
drivers/pci/probe.c