Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3122f5f authored by Felipe Balbi's avatar Felipe Balbi
Browse files

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: default avatarFelipe Balbi <balbi@ti.com>
parent 62e37078
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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;
	}
}

/* --------------------------------------------------------------------------