Jelajahi Sumber

USB: fix compile problems in ehci-hcd

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>
Alan Stern 17 tahun lalu
induk
melakukan
aff6d18f95
2 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 2 2
      drivers/usb/host/ehci-hub.c
  2. 1 0
      drivers/usb/host/ehci-pci.c

+ 2 - 2
drivers/usb/host/ehci-hub.c

@@ -28,10 +28,10 @@
 
 
 /*-------------------------------------------------------------------------*/
 /*-------------------------------------------------------------------------*/
 
 
-#ifdef	CONFIG_PM
-
 #define	PORT_WAKE_BITS	(PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
 #define	PORT_WAKE_BITS	(PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
 
 
+#ifdef	CONFIG_PM
+
 static int ehci_hub_control(
 static int ehci_hub_control(
 	struct usb_hcd	*hcd,
 	struct usb_hcd	*hcd,
 	u16		typeReq,
 	u16		typeReq,

+ 1 - 0
drivers/usb/host/ehci-pci.c

@@ -222,6 +222,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
 		ehci_warn(ehci, "selective suspend/wakeup unavailable\n");
 		ehci_warn(ehci, "selective suspend/wakeup unavailable\n");
 #endif
 #endif
 
 
+	ehci_port_power(ehci, 1);
 	retval = ehci_pci_reinit(ehci, pdev);
 	retval = ehci_pci_reinit(ehci, pdev);
 done:
 done:
 	return retval;
 	return retval;