summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2010-10-15 14:59:15 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 10:22:15 -0700
commit436a389096e1feda2c382cad83b6a8d6de8615a0 (patch)
tree6c68d7e5ab037deef677e35a8b1bfc425e63694f /drivers/usb
parent39eb234874af4322f85e2a29e3aad33ce68cbed5 (diff)
downloadop-kernel-dev-436a389096e1feda2c382cad83b6a8d6de8615a0.zip
op-kernel-dev-436a389096e1feda2c382cad83b6a8d6de8615a0.tar.gz
usb: Fix linker errors with CONFIG_PM=n
Fix these linker errors when CONFIG_PM=n: ERROR: "xhci_bus_resume" [drivers/usb/host/xhci-hcd.ko] undefined! ERROR: "xhci_bus_suspend" [drivers/usb/host/xhci-hcd.ko] undefined! Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-hub.c7
-rw-r--r--drivers/usb/host/xhci.c6
-rw-r--r--drivers/usb/host/xhci.h14
3 files changed, 15 insertions, 12 deletions
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 7f2f63c..fef5a1f 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -742,9 +742,4 @@ int xhci_bus_resume(struct usb_hcd *hcd)
return 0;
}
-#else
-
-#define xhci_bus_suspend NULL
-#define xhci_bus_resume NULL
-
-#endif
+#endif /* CONFIG_PM */
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 9dc5be5..5d7d4e9 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -761,12 +761,6 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
spin_unlock_irq(&xhci->lock);
return 0;
}
-
-#else
-
-#define xhci_suspend NULL
-#define xhci_resume NULL
-
#endif /* CONFIG_PM */
/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index c08928a..93d3bf4 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1405,8 +1405,15 @@ int xhci_init(struct usb_hcd *hcd);
int xhci_run(struct usb_hcd *hcd);
void xhci_stop(struct usb_hcd *hcd);
void xhci_shutdown(struct usb_hcd *hcd);
+
+#ifdef CONFIG_PM
int xhci_suspend(struct xhci_hcd *xhci);
int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
+#else
+#define xhci_suspend NULL
+#define xhci_resume NULL
+#endif
+
int xhci_get_frame(struct usb_hcd *hcd);
irqreturn_t xhci_irq(struct usb_hcd *hcd);
irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd);
@@ -1481,8 +1488,15 @@ void xhci_ring_ep_doorbell(struct xhci_hcd *xhci, unsigned int slot_id,
int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
char *buf, u16 wLength);
int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);
+
+#ifdef CONFIG_PM
int xhci_bus_suspend(struct usb_hcd *hcd);
int xhci_bus_resume(struct usb_hcd *hcd);
+#else
+#define xhci_bus_suspend NULL
+#define xhci_bus_resume NULL
+#endif /* CONFIG_PM */
+
u32 xhci_port_state_to_neutral(u32 state);
int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port);
void xhci_ring_device(struct xhci_hcd *xhci, int slot_id);
OpenPOWER on IntegriCloud