]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: check saved state before restore
authorAlek Du <alek.du@intel.com>
Sat, 8 Aug 2009 00:46:19 +0000 (08:46 +0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 20 Aug 2009 16:08:45 +0000 (09:08 -0700)
commitcc3d40f51e5014a2c07de6576bf7b58db0a26b21
tree4a18447facd22c384c871e312cb3183c01a44b2c
parent67f56d3c0c486c121842d30e819c3152c3aa65f5
PCI: check saved state before restore

Without the check, the config space may be filled with zeros. Though
the driver should try to avoid call restoring before saving, but the
pci layer also should check this.

Also removes the existing check in pci_restore_standard_config, since
it's superfluous with the new check in restore_state.

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci-driver.c
drivers/pci/pci.c