Commit 436a3890 authored by Sarah Sharp's avatar Sarah Sharp Committed by Greg Kroah-Hartman

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: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 39eb2348
...@@ -742,9 +742,4 @@ int xhci_bus_resume(struct usb_hcd *hcd) ...@@ -742,9 +742,4 @@ int xhci_bus_resume(struct usb_hcd *hcd)
return 0; return 0;
} }
#else #endif /* CONFIG_PM */
#define xhci_bus_suspend NULL
#define xhci_bus_resume NULL
#endif
...@@ -761,12 +761,6 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) ...@@ -761,12 +761,6 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
spin_unlock_irq(&xhci->lock); spin_unlock_irq(&xhci->lock);
return 0; return 0;
} }
#else
#define xhci_suspend NULL
#define xhci_resume NULL
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
......
...@@ -1405,8 +1405,15 @@ int xhci_init(struct usb_hcd *hcd); ...@@ -1405,8 +1405,15 @@ int xhci_init(struct usb_hcd *hcd);
int xhci_run(struct usb_hcd *hcd); int xhci_run(struct usb_hcd *hcd);
void xhci_stop(struct usb_hcd *hcd); void xhci_stop(struct usb_hcd *hcd);
void xhci_shutdown(struct usb_hcd *hcd); void xhci_shutdown(struct usb_hcd *hcd);
#ifdef CONFIG_PM
int xhci_suspend(struct xhci_hcd *xhci); int xhci_suspend(struct xhci_hcd *xhci);
int xhci_resume(struct xhci_hcd *xhci, bool hibernated); 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); int xhci_get_frame(struct usb_hcd *hcd);
irqreturn_t xhci_irq(struct usb_hcd *hcd); irqreturn_t xhci_irq(struct usb_hcd *hcd);
irqreturn_t xhci_msi_irq(int 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, ...@@ -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, int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
char *buf, u16 wLength); char *buf, u16 wLength);
int xhci_hub_status_data(struct usb_hcd *hcd, char *buf); 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_suspend(struct usb_hcd *hcd);
int xhci_bus_resume(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); u32 xhci_port_state_to_neutral(u32 state);
int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port); int xhci_find_slot_id_by_port(struct xhci_hcd *xhci, u16 port);
void xhci_ring_device(struct xhci_hcd *xhci, int slot_id); void xhci_ring_device(struct xhci_hcd *xhci, int slot_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment