[PATCH 6/8] usb: xhci: avoid warning for !PM_SLEEP

Arnd Bergmann arnd at arndb.de
Thu May 8 06:52:19 PDT 2014


If we build a kernel with PM_SUSPEND set and no PM_SLEEP,
we get a build warning in the xhci-plat driver about unused
functions.

To fix this, use "#ifdef CONFIG_PM_SLEEP", like we do in most
other drivers nowadays.

Signed-off-by: Arnd Bergmann <arnd at arndb.de>
Cc: Mathias Nyman <mathias.nyman at intel.com>
---
 drivers/usb/host/xhci-plat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 151901c..3473296 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -202,7 +202,7 @@ static int xhci_plat_remove(struct platform_device *dev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int xhci_plat_suspend(struct device *dev)
 {
 	struct usb_hcd	*hcd = dev_get_drvdata(dev);
-- 
1.8.3.2




More information about the linux-arm-kernel mailing list