提交 e3122f5f 编写于 作者: F Felipe Balbi

usb: gadget: function: uvc: disable endpoints on ->disable()

when our ->disable() method is called, we must
make sure to teardown all our resources, including
endpoints.
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 62e37078
......@@ -390,6 +390,16 @@ uvc_function_disable(struct usb_function *f)
v4l2_event_queue(uvc->vdev, &v4l2_event);
uvc->state = UVC_STATE_DISCONNECTED;
if (uvc->video.ep->driver_data) {
usb_ep_disable(uvc->video.ep);
uvc->video.ep->driver_data = NULL;
}
if (uvc->control_ep->driver_data) {
usb_ep_disable(uvc->control_ep);
uvc->control_ep->driver_data = NULL;
}
}
/* --------------------------------------------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册