aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2010-10-15 17:59:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 13:22:15 -0400
commit436a389096e1feda2c382cad83b6a8d6de8615a0 (patch)
tree6c68d7e5ab037deef677e35a8b1bfc425e63694f /drivers/usb/host
parent39eb234874af4322f85e2a29e3aad33ce68cbed5 (diff)
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/host')
-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 7f2f63cb6c53..fef5a1f9d483 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)
742 return 0; 742 return 0;
743} 743}
744 744
745#else 745#endif /* CONFIG_PM */
746
747#define xhci_bus_suspend NULL
748#define xhci_bus_resume NULL
749
750#endif
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 9dc5be557d92..5d7d4e951ea4 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)
761 spin_unlock_irq(&xhci->lock); 761 spin_unlock_irq(&xhci->lock);
762 return 0; 762 return 0;
763} 763}
764
765#else
766
767#define xhci_suspend NULL
768#define xhci_resume NULL
769
770#endif /* CONFIG_PM */ 764#endif /* CONFIG_PM */
771 765
772/*-------------------------------------------------------------------------*/ 766/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index c08928adc524..93d3bf4d213c 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1405,8 +1405,15 @@ int xhci_init(struct usb_hcd *hcd);
1405int xhci_run(struct usb_hcd *hcd); 1405int xhci_run(struct usb_hcd *hcd);
1406void xhci_stop(struct usb_hcd *hcd); 1406void xhci_stop(struct usb_hcd *hcd);
1407void xhci_shutdown(struct usb_hcd *hcd); 1407void xhci_shutdown(struct usb_hcd *hcd);
1408
1409#ifdef CONFIG_PM
1408int xhci_suspend(struct xhci_hcd *xhci); 1410int xhci_suspend(struct xhci_hcd *xhci);
1409int xhci_resume(struct xhci_hcd *xhci, bool hibernated); 1411int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
1412#else
1413#define xhci_suspend NULL
1414#define xhci_resume NULL
1415#endif
1416
1410int xhci_get_frame(struct usb_hcd *hcd); 1417int xhci_get_frame(struct usb_hcd *hcd);
1411irqreturn_t xhci_irq(struct usb_hcd *hcd); 1418irqreturn_t xhci_irq(struct usb_hcd *hcd);
1412irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd); 1419irqreturn_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,
1481int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, 1488int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
1482 char *buf, u16 wLength); 1489 char *buf, u16 wLength);
1483int xhci_hub_status_data(struct usb_hcd *hcd, char *buf); 1490int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);
1491
1492#ifdef CONFIG_PM
1484int xhci_bus_suspend(struct usb_hcd *hcd); 1493int xhci_bus_suspend(struct usb_hcd *hcd);
1485int xhci_bus_resume(struct usb_hcd *hcd); 1494int xhci_bus_resume(struct usb_hcd *hcd);
1495#else
1496#define xhci_bus_suspend NULL
1497#define xhci_bus_resume NULL
1498#endif /* CONFIG_PM */
1499
1486u32 xhci_port_state_to_neutral(u32 state); 1500u32 xhci_port_state_to_neutral(u32 state);
1487int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port); 1501int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port);
1488void xhci_ring_device(struct xhci_hcd *xhci, int slot_id); 1502void xhci_ring_device(struct xhci_hcd *xhci, int slot_id);