mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-04-13 23:53:30 +00:00
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>