]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/core/hcd-pci.c
[PATCH] USB: remove usbcore-specific wakeup flags
[karo-tx-linux.git] / drivers / usb / core / hcd-pci.c
index 29b5b2a6e183e11aab66d4615d502869bfeb9812..e0afb5ad29e54ea31e2bb2ea27530e7095434dec 100644 (file)
@@ -264,14 +264,19 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
                 */
                retval = pci_set_power_state (dev, PCI_D3hot);
                if (retval == 0) {
-                       dev_dbg (hcd->self.controller, "--> PCI D3\n");
+                       int wake = device_can_wakeup(&hcd->self.root_hub->dev);
+
+                       wake = wake && device_may_wakeup(hcd->self.controller);
+
+                       dev_dbg (hcd->self.controller, "--> PCI D3%s\n",
+                                       wake ? "/wakeup" : "");
 
                        /* Ignore these return values.  We rely on pci code to
                         * reject requests the hardware can't implement, rather
                         * than coding the same thing.
                         */
-                       (void) pci_enable_wake (dev, PCI_D3hot, hcd->remote_wakeup);
-                       (void) pci_enable_wake (dev, PCI_D3cold, hcd->remote_wakeup);
+                       (void) pci_enable_wake (dev, PCI_D3hot, wake);
+                       (void) pci_enable_wake (dev, PCI_D3cold, wake);
                } else {
                        dev_dbg (&dev->dev, "PCI D3 suspend fail, %d\n",
                                        retval);