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:
Felipe Balbi 2014-09-29 13:43:20 -05:00
parent 62e370785c
commit e3122f5fed

View File

@ -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;
}
}
/* --------------------------------------------------------------------------