Skip to content

Commit d6b874f

Browse files
ribaldamchehab
authored andcommitted
media: uvcvideo: Flush the control cache when we get an event
Asynchronous controls trigger an event when they have completed their operation. This can make that the control cached value does not match the value in the device. Let's flush the cache to be on the safe side. Signed-off-by: Ricardo Ribalda <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 02baaa0 commit d6b874f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/media/usb/uvc/uvc_ctrl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,6 +1622,9 @@ void uvc_ctrl_status_event(struct uvc_video_chain *chain,
16221622

16231623
mutex_lock(&chain->ctrl_mutex);
16241624

1625+
/* Flush the control cache, the data might have changed. */
1626+
ctrl->loaded = 0;
1627+
16251628
handle = ctrl->handle;
16261629
if (handle)
16271630
uvc_ctrl_set_handle(handle, ctrl, NULL);

0 commit comments

Comments
 (0)