USB: fix compile problems in ehci-hcd
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 18 Apr 2008 15:11:26 +0000 (11:11 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Apr 2008 04:16:54 +0000 (21:16 -0700)
This patch (as1072) fixes some recently-introduced compile problems
that show up in ehci-hcd when CONFIG_PM is turned off.

PORT_WAKE_BITS needs to be defined always.

ehci_port_power() is called during initialization by all the
EHCI variants other than the PCI version, in which it is
"defined but not used".  So add a call to it.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-pci.c

index 536b433..efffef6 100644 (file)
 
 /*-------------------------------------------------------------------------*/
 
-#ifdef CONFIG_PM
-
 #define        PORT_WAKE_BITS  (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
 
+#ifdef CONFIG_PM
+
 static int ehci_hub_control(
        struct usb_hcd  *hcd,
        u16             typeReq,
index 88dad4b..5bb7f6b 100644 (file)
@@ -222,6 +222,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
                ehci_warn(ehci, "selective suspend/wakeup unavailable\n");
 #endif
 
+       ehci_port_power(ehci, 1);
        retval = ehci_pci_reinit(ehci, pdev);
 done:
        return retval;