PCI PM: Make pci_prepare_to_sleep() disable wake-up if needed
PATCH 1/1 PCI PM: Make pci_prepare_to_sleep() disable wake-up if needed
From: Rafael J. Wysocki <[email protected]>
If the device is not supposed to wake up the system, ie. when device_may_wakeup(&dev->dev) returns 'false', pci_prepare_to_sleep() should pass 'false' to pci_enable_wake() so that it calls the platform to disable the wake-up capability of the device.
Signed-off-by Rafael J. Wysocki <[email protected]>
--- drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci.c +1 -1
@@ -1268,7 +1268,7 @@ int pci_prepare_to_sleep(struct pci_devif (target_state ==PCI_POWER_ERROR )return -EIO ; -pci_enable_wake (dev, target_state, true); +pci_enable_wake (dev, target_state,device_may_wakeup (&dev->dev)); error =pci_set_power_state (dev, target_state);