usb: f_uvc: fix unbind issues camera open and release events
currently, we are waiting for unbind events from userspace
to free all uvc descriptors during release but external
camera applications do not send and register any uvents to
send to kernel to allow unbind compositions leading to
NULL dereference on uvc objects during repeatitive open
and close.
Fix this by waiting for release event from userspace and
then allow unbind composition on kernel so that uvc free
can happen post gadget deactivate.
Also, based on uvc ref count of v4l2 device open and release
returning -EPERM for any open calls from userspace if
any camera application has already opened one v4l2 device
and not closed it.
Change-Id: Ief5aae4337173e92878438712e665a591915ef94
Signed-off-by:
AKASH KUMAR <quic_akakum@quicinc.com>
Loading
Please sign in to comment