usb: gadget: f_uvc: Fix unbind issues
Currently user space application which has v4l2 file handle has
no way to know that uvc function is unbounded from the composition.
Later when it tries to release the file handle, we end up accessing
stale gadget side data structures.
Address this issue by sending an uevent upon unbind. If the user space
application has subscribed to this uevent, block the unbind until
the last v4l2 file handle is released.
The function drivers which use function activate/deactivate method
to delay enumeration has no way to keep the de-activations count sync
across composition switch. Reset the cdev->deactivations to start
from the fresh when a new composition is selected.
Change-Id: Id389cf8cc59aba6dbeca7c1fb52a990a25c084de
Signed-off-by:
Pavankumar Kondeti <quic_pkondeti@quicinc.com>
Loading
Please register or sign in to comment