From: Rafael J. Wysocki Date: Wed, 4 Feb 2009 00:59:09 +0000 (+0100) Subject: PCI PM: Fix saving of device state in pci_legacy_suspend X-Git-Tag: v2.6.29-rc4~5^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99dadce8756bf08f5f8baf749533d044f6b3ff25;p=pandora-kernel.git PCI PM: Fix saving of device state in pci_legacy_suspend Make pci_legacy_suspend() save the state of the device if it is in PCI_UNKNOWN after its suspend callback has run and warn only if the power state of the device has been changed by its suspend callback. Also, use WARN_ONCE(), which is more useful, in pci_legacy_suspend(), so that the name of the offending function is printed. Additionally, remove the unnecessary line of code setting pci_dev->state_saved. Signed-off-by: Rafael J. Wysocki Reported-by: Benjamin Herrenschmidt Acked-by: Linus Torvalds Signed-off-by: Jesse Barnes --- Reading git-diff-tree failed