aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2010-10-15 11:24:14 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 10:22:14 -0700
commitb5b5c3ac5123dab047cfeff472053ab737052e9b (patch)
treed86d34c3e268f3ff52154add1376e89e1a98bdb2 /drivers/usb/host
parentUSB: accept some invalid ep0-maxpacket values (diff)
downloadlinux-dev-b5b5c3ac5123dab047cfeff472053ab737052e9b.tar.xz
linux-dev-b5b5c3ac5123dab047cfeff472053ab737052e9b.zip
USB: xhci: Fix compile error when CONFIG_PM=n
Fix this error when CONFIG_PM is not enabled: drivers/usb/host/xhci.c:675: error: implicit declaration of function 'usb_root_hub_lost_power' Wrap xhci_suspend() and xhci_resume() into an ifdef CONFIG_PM, along with the functions that only they call -- xhci_save_registers() and xhci_restore_registers(). Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/xhci.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 33d0034d8a6f..9dc5be557d92 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -551,6 +551,7 @@ void xhci_shutdown(struct usb_hcd *hcd)
xhci_readl(xhci, &xhci->op_regs->status));
}
+#ifdef CONFIG_PM
static void xhci_save_registers(struct xhci_hcd *xhci)
{
xhci->s3.command = xhci_readl(xhci, &xhci->op_regs->command);
@@ -761,6 +762,13 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
return 0;
}
+#else
+
+#define xhci_suspend NULL
+#define xhci_resume NULL
+
+#endif /* CONFIG_PM */
+
/*-------------------------------------------------------------------------*/
/**