usb: cdns3: Add static to cdns3_gadget_exit function
authorPawel Laszczak <pawell@cadence.com>
Wed, 7 Oct 2020 04:02:30 +0000 (06:02 +0200)
committerPeter Chen <peter.chen@nxp.com>
Thu, 10 Dec 2020 00:45:26 +0000 (08:45 +0800)
Function cdns3_gadget_exit is used only in gadget.c file.
This patch removes declaration and definition of this
function from gadget-export.h file and makes it static.

Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
drivers/usb/cdns3/gadget-export.h
drivers/usb/cdns3/gadget.c

index 577469eee961d4f217ed7622df019c026efa35e5..702c5a267a927f1c81c1a72b6f22e44edf67a3a5 100644 (file)
@@ -13,7 +13,6 @@
 #ifdef CONFIG_USB_CDNS3_GADGET
 
 int cdns3_gadget_init(struct cdns3 *cdns);
-void cdns3_gadget_exit(struct cdns3 *cdns);
 #else
 
 static inline int cdns3_gadget_init(struct cdns3 *cdns)
@@ -21,8 +20,6 @@ static inline int cdns3_gadget_init(struct cdns3 *cdns)
        return -ENXIO;
 }
 
-static inline void cdns3_gadget_exit(struct cdns3 *cdns) { }
-
 #endif
 
 #endif /* __LINUX_CDNS3_GADGET_EXPORT */
index 365f30fb115994c4de6be23d0eb0e3c9ec6845fd..c62e09ba9231d81477c5857d2ffe91bc67b60212 100644 (file)
@@ -3083,7 +3083,7 @@ static void cdns3_gadget_release(struct device *dev)
        kfree(priv_dev);
 }
 
-void cdns3_gadget_exit(struct cdns3 *cdns)
+static void cdns3_gadget_exit(struct cdns3 *cdns)
 {
        struct cdns3_device *priv_dev;