PCI PM: Read power state from device after trying to change it on resume

pci_restore_standard_config() unconditionally changes current_state
to PCI_D0 after attempting to change the device's power state, but
it should rather read the actual current power state from the
device.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

authored by Rafael J. Wysocki and committed by Jesse Barnes 49c96811 cbbc2f6b

+1 -1
+1 -1
drivers/pci/pci.c
··· 1418 break; 1419 } 1420 1421 - dev->current_state = PCI_D0; 1422 1423 Restore: 1424 return dev->state_saved ? pci_restore_state(dev) : 0;
··· 1418 break; 1419 } 1420 1421 + pci_update_current_state(dev, PCI_D0); 1422 1423 Restore: 1424 return dev->state_saved ? pci_restore_state(dev) : 0;