From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Greg KH <gregkh@suse.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
lud <linux-usb@vger.kernel.org>, Andiry Xu <andiry.xu@amd.com>,
Dong Nguyen <dong.nguyen@amd.com>,
Libin Yang <libin.yang@amd.com>
Subject: [PATCH] xhci: Fix compile error when CONFIG_PM=n
Date: Fri, 15 Oct 2010 11:24:14 -0700 [thread overview]
Message-ID: <20101015182414.GA12349@xanatos> (raw)
In-Reply-To: <20101015181656.GA6473@kroah.com>
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>
---
drivers/usb/host/xhci.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 33d0034..9dc5be5 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 */
+
/*-------------------------------------------------------------------------*/
/**
--
1.6.3.3
next prev parent reply other threads:[~2010-10-15 18:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 5:50 linux-next: Tree for October 15 Stephen Rothwell
2010-10-15 15:44 ` linux-next: Tree for October 15 (usb/xhci) Randy Dunlap
[not found] ` <20101015084420.6624796d.randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2010-10-15 16:48 ` Greg KH
2010-10-15 17:52 ` Sarah Sharp
2010-10-15 18:16 ` Greg KH
2010-10-15 18:24 ` Sarah Sharp [this message]
2010-10-15 20:02 ` [PATCH] xhci: Fix compile error when CONFIG_PM=n Randy Dunlap
2010-10-15 20:57 ` Sarah Sharp
2010-10-15 21:59 ` [PATCH] usb: Fix linker errors with CONFIG_PM=n Sarah Sharp
2010-10-15 22:23 ` Marcin Slusarz
[not found] ` <20101015222301.GA4080-OI9uyE9O0yo@public.gmane.org>
2010-10-15 23:26 ` Sarah Sharp
2010-10-16 11:35 ` Marcin Slusarz
2010-10-15 23:27 ` Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101015182414.GA12349@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=andiry.xu@amd.com \
--cc=dong.nguyen@amd.com \
--cc=gregkh@suse.de \
--cc=libin.yang@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).