提交 5f2d12a2 编写于 作者: M Michael Tretter 提交者: Zheng Zengkai

usb: gadget: uvc: rename function to be more consistent

stable inclusion
from stable-v5.10.117
commit 42505e362285e2512aca28fea2ceead859cf9d54
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L66B

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=42505e362285e2512aca28fea2ceead859cf9d54

--------------------------------

commit e6bab2b6 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: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: NPaul Elder <paul.elder@ideasonboard.com>
Signed-off-by: NMichael Tretter <m.tretter@pengutronix.de>
Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20211017215017.18392-3-m.grzeschik@pengutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 2ee798ab
...@@ -883,12 +883,13 @@ static void uvc_free(struct usb_function *f) ...@@ -883,12 +883,13 @@ static void uvc_free(struct usb_function *f)
kfree(uvc); 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 usb_composite_dev *cdev = c->cdev;
struct uvc_device *uvc = to_uvc(f); 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); device_remove_file(&uvc->vdev.dev, &dev_attr_function_name);
video_unregister_device(&uvc->vdev); video_unregister_device(&uvc->vdev);
...@@ -942,7 +943,7 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi) ...@@ -942,7 +943,7 @@ static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
/* Register the function. */ /* Register the function. */
uvc->func.name = "uvc"; uvc->func.name = "uvc";
uvc->func.bind = uvc_function_bind; 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.get_alt = uvc_function_get_alt;
uvc->func.set_alt = uvc_function_set_alt; uvc->func.set_alt = uvc_function_set_alt;
uvc->func.disable = uvc_function_disable; uvc->func.disable = uvc_function_disable;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册