From: Rafael J. Wysocki Date: Mon, 30 Mar 2009 19:46:27 +0000 (+0200) Subject: PCI PM: Make pci_prepare_to_sleep() disable wake-up if needed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8efb8c76fcdccf5050c0ea059dac392789baaff2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git PCI PM: Make pci_prepare_to_sleep() disable wake-up if needed 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 Acked-by: Jesse Barnes --- diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index de54fd643baf..0195066251e5 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1263,7 +1263,7 @@ int pci_prepare_to_sleep(struct pci_dev *dev) if (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);