linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] usb: cdns3: fix build when PM_SLEEP is not set
@ 2020-12-08 19:55 Randy Dunlap
  0 siblings, 0 replies; only message in thread
From: Randy Dunlap @ 2020-12-08 19:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Peter Chen, Pawel Laszczak, Roger Quadros,
	linux-usb, Greg Kroah-Hartman

Fix build error when CONFIG_PM_SLEEP is not enabled by adding
stubs for the PM_SLEEP functions.

../drivers/usb/cdns3/cdns3-plat.c: In function ‘cdns3_controller_resume’:
../drivers/usb/cdns3/cdns3-plat.c:246:2: error: implicit declaration of function ‘cdns_resume’; did you mean ‘cdns_remove’? [-Werror=implicit-function-declaration]
  cdns_resume(cdns, !PMSG_IS_AUTO(msg));
  ^~~~~~~~~~~

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Peter Chen <peter.chen@nxp.com>
Cc: Pawel Laszczak <pawell@cadence.com>
Cc: Roger Quadros <rogerq@ti.com>
Cc: linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/usb/cdns3/core.h |    5 +++++
 1 file changed, 5 insertions(+)

--- linux-next-20201208.orig/drivers/usb/cdns3/core.h
+++ linux-next-20201208/drivers/usb/cdns3/core.h
@@ -127,5 +127,10 @@ int cdns_remove(struct cdns *cdns);
 #ifdef CONFIG_PM_SLEEP
 int cdns_resume(struct cdns *cdns, u8 set_active);
 int cdns_suspend(struct cdns *cdns);
+#else /* CONFIG_PM_SLEEP */
+static inline int cdns_resume(struct cdns *cdns, u8 set_active)
+{ return 0; }
+static inline int cdns_suspend(struct cdns *cdns)
+{ return 0; }
 #endif /* CONFIG_PM_SLEEP */
 #endif /* __LINUX_CDNS3_CORE_H */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-08 20:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-08 19:55 [PATCH -next] usb: cdns3: fix build when PM_SLEEP is not set Randy Dunlap

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).