mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 17:57:05 +07:00
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: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
62e370785c
commit
e3122f5fed
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user