1 From 9f35d612da5592f1bf1cae44ec1e023df37bea12 Mon Sep 17 00:00:00 2001
2 From: Xiaolei Wang <xiaolei.wang@windriver.com>
3 Date: Tue, 26 Sep 2023 15:53:33 +0800
4 Subject: usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled
6 From: Xiaolei Wang <xiaolei.wang@windriver.com>
8 commit 9f35d612da5592f1bf1cae44ec1e023df37bea12 upstream.
10 The return type of cdns_set_active () is inconsistent
11 depending on whether CONFIG_PM_SLEEP is enabled, so the
12 return value is modified to void type.
14 Reported-by: Pavel Machek <pavel@denx.de>
15 Closes: https://lore.kernel.org/all/ZP7lIKUzD68XA91j@duo.ucw.cz/
16 Fixes: 2319b9c87fe2 ("usb: cdns3: Put the cdns set active part outside the spin lock")
17 Cc: stable@vger.kernel.org
18 Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
19 Reviewed-by: Pavel Machek <pavel@denx.de>
20 Reviewed-by: Roger Quadros <rogerq@kernel.org>
21 Acked-by: Peter Chen <peter.chen@kernel.org>
22 Link: https://lore.kernel.org/r/20230926075333.1791011-1-xiaolei.wang@windriver.com
23 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 drivers/usb/cdns3/core.h | 3 +--
26 1 file changed, 1 insertion(+), 2 deletions(-)
28 --- a/drivers/usb/cdns3/core.h
29 +++ b/drivers/usb/cdns3/core.h
30 @@ -131,8 +131,7 @@ void cdns_set_active(struct cdns *cdns,
31 #else /* CONFIG_PM_SLEEP */
32 static inline int cdns_resume(struct cdns *cdns)
34 -static inline int cdns_set_active(struct cdns *cdns, u8 set_active)
36 +static inline void cdns_set_active(struct cdns *cdns, u8 set_active) { }
37 static inline int cdns_suspend(struct cdns *cdns)
39 #endif /* CONFIG_PM_SLEEP */