linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: cdns3: Add static to  cdns3_gadget_exit function
@ 2020-10-07  4:02 Pawel Laszczak
  2020-10-07  8:04 ` Roger Quadros
  0 siblings, 1 reply; 2+ messages in thread
From: Pawel Laszczak @ 2020-10-07  4:02 UTC (permalink / raw)
  To: balbi
  Cc: peter.chen, rogerq, nsekhar, gregkh, linux-usb, linux-kernel,
	kurahul, Pawel Laszczak

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>
---
 drivers/usb/cdns3/gadget-export.h | 3 ---
 drivers/usb/cdns3/gadget.c        | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/usb/cdns3/gadget-export.h b/drivers/usb/cdns3/gadget-export.h
index 577469eee961..702c5a267a92 100644
--- a/drivers/usb/cdns3/gadget-export.h
+++ b/drivers/usb/cdns3/gadget-export.h
@@ -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 */
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index 692acf7b9b14..6ff3aa3db497 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -3069,7 +3069,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;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: cdns3: Add static to cdns3_gadget_exit function
  2020-10-07  4:02 [PATCH] usb: cdns3: Add static to cdns3_gadget_exit function Pawel Laszczak
@ 2020-10-07  8:04 ` Roger Quadros
  0 siblings, 0 replies; 2+ messages in thread
From: Roger Quadros @ 2020-10-07  8:04 UTC (permalink / raw)
  To: Pawel Laszczak, balbi
  Cc: peter.chen, nsekhar, gregkh, linux-usb, linux-kernel, kurahul



On 07/10/2020 07:02, Pawel Laszczak wrote:
> 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>


> ---
>   drivers/usb/cdns3/gadget-export.h | 3 ---
>   drivers/usb/cdns3/gadget.c        | 2 +-
>   2 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/cdns3/gadget-export.h b/drivers/usb/cdns3/gadget-export.h
> index 577469eee961..702c5a267a92 100644
> --- a/drivers/usb/cdns3/gadget-export.h
> +++ b/drivers/usb/cdns3/gadget-export.h
> @@ -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 */
> diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
> index 692acf7b9b14..6ff3aa3db497 100644
> --- a/drivers/usb/cdns3/gadget.c
> +++ b/drivers/usb/cdns3/gadget.c
> @@ -3069,7 +3069,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;
>   
> 

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-07  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07  4:02 [PATCH] usb: cdns3: Add static to cdns3_gadget_exit function Pawel Laszczak
2020-10-07  8:04 ` Roger Quadros

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