Commit 720ef7e5 authored by AKASH KUMAR's avatar AKASH KUMAR
Browse files

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: default avatarAKASH KUMAR <quic_akakum@quicinc.com>
parent 89a61a36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment