Skip to content

Commit

Permalink
usb: gadget: uvc: rename function to be more consistent
Browse files Browse the repository at this point in the history
commit e6bab2b upstream.

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

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20211017215017.18392-3-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
tretter authored and gregkh committed May 18, 2022
1 parent 002e722 commit 42505e3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/usb/gadget/function/f_uvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,12 +883,13 @@ 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);
Expand Down Expand Up @@ -942,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;
Expand Down

0 comments on commit 42505e3

Please sign in to comment.