提交 b5b5c3ac 编写于 作者: S Sarah Sharp 提交者: Greg Kroah-Hartman

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: NRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 56626a72
......@@ -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 */
/*-------------------------------------------------------------------------*/
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册