]> err.no Git - linux-2.6/blobdiff - drivers/usb/host/ehci-hub.c
USB: minor ehci xITD simplifications
[linux-2.6] / drivers / usb / host / ehci-hub.c
index 40e8240b7851f012e0e4fe9e71c37ab27d99d67a..21ac3781f21abe7bc0d628593e6174c122d87c36 100644 (file)
@@ -28,7 +28,7 @@
 
 /*-------------------------------------------------------------------------*/
 
-#ifdef CONFIG_USB_PERSIST
+#ifdef CONFIG_PM
 
 static int ehci_hub_control(
        struct usb_hcd  *hcd,
@@ -104,15 +104,6 @@ static void ehci_handover_companion_ports(struct ehci_hcd *ehci)
        ehci->owned_ports = 0;
 }
 
-#else  /* CONFIG_USB_PERSIST */
-
-static inline void ehci_handover_companion_ports(struct ehci_hcd *ehci)
-{ }
-
-#endif
-
-#ifdef CONFIG_PM
-
 static int ehci_bus_suspend (struct usb_hcd *hcd)
 {
        struct ehci_hcd         *ehci = hcd_to_ehci (hcd);
@@ -135,8 +126,6 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
                hcd->state = HC_STATE_QUIESCING;
        }
        ehci->command = ehci_readl(ehci, &ehci->regs->command);
-       if (ehci->reclaim)
-               end_unlink_async(ehci);
        ehci_work(ehci);
 
        /* Unlike other USB host controller types, EHCI doesn't have
@@ -180,6 +169,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
        ehci_halt (ehci);
        hcd->state = HC_STATE_SUSPENDED;
 
+       if (ehci->reclaim)
+               end_unlink_async(ehci);
+
        /* allow remote wakeup */
        mask = INTR_MASK;
        if (!device_may_wakeup(&hcd->self.root_hub->dev))
@@ -280,9 +272,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd)
        ehci_writel(ehci, INTR_MASK, &ehci->regs->intr_enable);
 
        spin_unlock_irq (&ehci->lock);
-
-       if (!power_okay)
-               ehci_handover_companion_ports(ehci);
+       ehci_handover_companion_ports(ehci);
        return 0;
 }
 
@@ -777,7 +767,7 @@ static int ehci_hub_control (
                if (temp & PORT_POWER)
                        status |= 1 << USB_PORT_FEAT_POWER;
 
-#ifndef        EHCI_VERBOSE_DEBUG
+#ifndef        VERBOSE_DEBUG
        if (status & ~0xffff)   /* only if wPortChange is interesting */
 #endif
                dbg_port (ehci, "GetStatus", wIndex + 1, temp);