[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1386911905-2366-3-git-send-email-david.a.cohen@linux.intel.com>
Date: Thu, 12 Dec 2013 21:18:24 -0800
From: David Cohen <david.a.cohen@...ux.intel.com>
To: pavel@....cz, rjw@...ysocki.net, len.brown@...el.com,
sarah.a.sharp@...ux.intel.com, gregkh@...uxfoundation.org
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, santosh.shilimkar@...com,
David Cohen <david.a.cohen@...ux.intel.com>
Subject: [RFC/PATCH 2/3] usb/xhci: implement proper static inline stubs when !CONFIG_PM
Current xhci_suspend() and xhci_resume() implementation in case of
CONFIG_PM not defined is buggy. If we try to use them we get the
following error:
drivers/usb/host/xhci-plat.c: In function ‘xhci_plat_suspend’:
drivers/usb/host/xhci-plat.c:205:21: error: called object ‘0u’ is not a function
drivers/usb/host/xhci-plat.c: In function ‘xhci_plat_resume’:
drivers/usb/host/xhci-plat.c:213:20: error: called object ‘0u’ is not a function
It happens because the function names are replaced by NULL but the
brackets stay: NULL()
This patch implements proper static inline stubs.
Signed-off-by: David Cohen <david.a.cohen@...ux.intel.com>
---
drivers/usb/host/xhci.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 941d5f59e4dc..6a5e7a98de7e 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1771,8 +1771,10 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks);
int xhci_suspend(struct xhci_hcd *xhci);
int xhci_resume(struct xhci_hcd *xhci, bool hibernated);
#else
-#define xhci_suspend NULL
-#define xhci_resume NULL
+static inline int
+xhci_suspend(struct xhci_hcd *xhci) { return 0; }
+static inline int
+xhci_resume(struct xhci_hcd *xhci, bool hibernated) { return 0; }
#endif
int xhci_get_frame(struct usb_hcd *hcd);
--
1.8.4.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists