aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci-acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r--drivers/pci/pci-acpi.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index ea15b0537457..e798c4736a66 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -111,12 +111,16 @@ static bool acpi_pci_can_wakeup(struct pci_dev *dev)
111 111
112static int acpi_pci_sleep_wake(struct pci_dev *dev, bool enable) 112static int acpi_pci_sleep_wake(struct pci_dev *dev, bool enable)
113{ 113{
114 int error = acpi_pm_device_sleep_wake(&dev->dev, enable); 114 int error;
115 115
116 if (!acpi_pci_can_wakeup(dev))
117 return 0;
118
119 error = acpi_pm_device_sleep_wake(&dev->dev, enable);
116 if (!error) 120 if (!error)
117 dev_printk(KERN_INFO, &dev->dev, 121 dev_info(&dev->dev, "wake-up capability %s by ACPI\n",
118 "wake-up capability %s by ACPI\n",
119 enable ? "enabled" : "disabled"); 122 enable ? "enabled" : "disabled");
123
120 return error; 124 return error;
121} 125}
122 126