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>
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);
return 0;
}
+#else
+
+#define xhci_suspend NULL
+#define xhci_resume NULL
+
+#endif /* CONFIG_PM */
+
/*-------------------------------------------------------------------------*/
/**