From 28a25ba3e59263a66b2a2cd3e153351b2db2a6b6 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Tue, 8 Dec 2020 11:55:35 -0800 Subject: [PATCH] usb: cdns3: fix build when PM_SLEEP is not set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Peter Chen Cc: Pawel Laszczak Cc: Roger Quadros Cc: linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman Signed-off-by: Peter Chen --- drivers/usb/cdns3/core.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/cdns3/core.h b/drivers/usb/cdns3/core.h index 56b568678980..f8e350cef699 100644 --- a/drivers/usb/cdns3/core.h +++ b/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 */