]> git.baikalelectronics.ru Git - kernel.git/commit
PCI PM: Add suspend counterpart of pci_reenable_device
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 7 Jan 2009 12:03:42 +0000 (13:03 +0100)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 7 Jan 2009 19:14:40 +0000 (11:14 -0800)
commit248016a61d43e18912c97e46b370eeb0938701a3
tree6b0509663958c9fc6c3b201e6a3b061af784ffa9
parent8d4c401f49020347dab58019e792f948d71409c2
PCI PM: Add suspend counterpart of pci_reenable_device

PCI devices without drivers are not disabled during suspend and
hibernation, but they are enabled during resume, with the help of
pci_reenable_device(), so there is an unbalanced execution of
pcibios_enable_device() in the resume code path.

To correct this introduce function pci_disable_enabled_device()
that will disable the argument device, if it is enabled when the
function is being run, without updating the device's pci_dev
structure and use it in the suspend code path to balance the
pci_reenable_device() executed during resume.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci-driver.c
drivers/pci/pci.c
drivers/pci/pci.h