diff mbox series

[2/7] usb: gadget: uvc: rename function to be more consistent

Message ID 20210930102717.15720-3-m.grzeschik@pengutronix.de (mailing list archive)
State Superseded
Headers show
Series usb: gadget: uvc: smaller fixes for stability | expand

Commit Message

Michael Grzeschik Sept. 30, 2021, 10:27 a.m. UTC
From: Michael Tretter <m.tretter@pengutronix.de>

When enabling info debugging for the uvc gadget, the bind and unbind
infos use different formats. Change the unbind to visually match the
bind.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 drivers/usb/gadget/function/f_uvc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Paul Elder Oct. 1, 2021, 2:41 a.m. UTC | #1
Hi Michael,

On Thu, Sep 30, 2021 at 12:27:12PM +0200, Michael Grzeschik wrote:
> From: Michael Tretter <m.tretter@pengutronix.de>
> 
> When enabling info debugging for the uvc gadget, the bind and unbind
> infos use different formats. Change the unbind to visually match the
> bind.
> 
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> ---
>  drivers/usb/gadget/function/f_uvc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
> index 9d87c0fb8f92e..1e93ab5c0c88d 100644
> --- a/drivers/usb/gadget/function/f_uvc.c
> +++ b/drivers/usb/gadget/function/f_uvc.c
> @@ -884,12 +884,12 @@ static void uvc_free(struct usb_function *f)
>  	kfree(uvc);
>  }
>  
> -static void uvc_unbind(struct usb_configuration *c, struct usb_function *f)
> +static void uvc_function_unbind(struct usb_configuration *c, struct usb_function *f)
>  {
>  	struct usb_composite_dev *cdev = c->cdev;
>  	struct uvc_device *uvc = to_uvc(f);
>  
> -	uvcg_info(f, "%s\n", __func__);
> +	uvcg_info(f, "%s()\n", __func__);
>  
>  	device_remove_file(&uvc->vdev.dev, &dev_attr_function_name);
>  	video_unregister_device(&uvc->vdev);
> @@ -943,7 +943,7 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
>  	/* Register the function. */
>  	uvc->func.name = "uvc";
>  	uvc->func.bind = uvc_function_bind;
> -	uvc->func.unbind = uvc_unbind;
> +	uvc->func.unbind = uvc_function_unbind;
>  	uvc->func.get_alt = uvc_function_get_alt;
>  	uvc->func.set_alt = uvc_function_set_alt;
>  	uvc->func.disable = uvc_function_disable;
> -- 
> 2.30.2
>
Laurent Pinchart Oct. 4, 2021, 10:13 p.m. UTC | #2
Hi Michael,

Thank you for the patch.

On Thu, Sep 30, 2021 at 12:27:12PM +0200, Michael Grzeschik wrote:
> From: Michael Tretter <m.tretter@pengutronix.de>
> 
> When enabling info debugging for the uvc gadget, the bind and unbind
> infos use different formats. Change the unbind to visually match the
> bind.
> 
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> ---
>  drivers/usb/gadget/function/f_uvc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
> index 9d87c0fb8f92e..1e93ab5c0c88d 100644
> --- a/drivers/usb/gadget/function/f_uvc.c
> +++ b/drivers/usb/gadget/function/f_uvc.c
> @@ -884,12 +884,12 @@ static void uvc_free(struct usb_function *f)
>  	kfree(uvc);
>  }
>  
> -static void uvc_unbind(struct usb_configuration *c, struct usb_function *f)
> +static void uvc_function_unbind(struct usb_configuration *c, struct usb_function *f)

I'd wrap this line.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  {
>  	struct usb_composite_dev *cdev = c->cdev;
>  	struct uvc_device *uvc = to_uvc(f);
>  
> -	uvcg_info(f, "%s\n", __func__);
> +	uvcg_info(f, "%s()\n", __func__);
>  
>  	device_remove_file(&uvc->vdev.dev, &dev_attr_function_name);
>  	video_unregister_device(&uvc->vdev);
> @@ -943,7 +943,7 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
>  	/* Register the function. */
>  	uvc->func.name = "uvc";
>  	uvc->func.bind = uvc_function_bind;
> -	uvc->func.unbind = uvc_unbind;
> +	uvc->func.unbind = uvc_function_unbind;
>  	uvc->func.get_alt = uvc_function_get_alt;
>  	uvc->func.set_alt = uvc_function_set_alt;
>  	uvc->func.disable = uvc_function_disable;
diff mbox series

Patch

diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index 9d87c0fb8f92e..1e93ab5c0c88d 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -884,12 +884,12 @@  static void uvc_free(struct usb_function *f)
 	kfree(uvc);
 }
 
-static void uvc_unbind(struct usb_configuration *c, struct usb_function *f)
+static void uvc_function_unbind(struct usb_configuration *c, struct usb_function *f)
 {
 	struct usb_composite_dev *cdev = c->cdev;
 	struct uvc_device *uvc = to_uvc(f);
 
-	uvcg_info(f, "%s\n", __func__);
+	uvcg_info(f, "%s()\n", __func__);
 
 	device_remove_file(&uvc->vdev.dev, &dev_attr_function_name);
 	video_unregister_device(&uvc->vdev);
@@ -943,7 +943,7 @@  static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
 	/* Register the function. */
 	uvc->func.name = "uvc";
 	uvc->func.bind = uvc_function_bind;
-	uvc->func.unbind = uvc_unbind;
+	uvc->func.unbind = uvc_function_unbind;
 	uvc->func.get_alt = uvc_function_get_alt;
 	uvc->func.set_alt = uvc_function_set_alt;
 	uvc->func.disable = uvc_function_disable;