Skip to content

Commit

Permalink
PCI PM: Read power state from device after trying to change it on resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki authored and Jesse Barnes committed Feb 5, 2009
1 parent cbbc2f6 commit 49c9681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ int pci_restore_standard_config(struct pci_dev *dev)
break;
}

dev->current_state = PCI_D0;
pci_update_current_state(dev, PCI_D0);

Restore:
return dev->state_saved ? pci_restore_state(dev) : 0;
Expand Down

0 comments on commit 49c9681

Please sign in to comment.