V4L/DVB (9036): uvcvideo: Fix control cache access when setting composite auto-update...
authorLaurent Pinchart <laurent.pinchart@skynet.be>
Sat, 27 Sep 2008 23:54:02 +0000 (20:54 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:37:08 +0000 (09:37 -0200)
commitb1accfa15533fdd40280aae3102e9599e63a7c10
tree12cfcd4b6213c8ce47f11d3776caf7f40bab6ee6
parent5e26d50f4e6b9c42bbfbaa452722797ece929cda
V4L/DVB (9036): uvcvideo: Fix control cache access when setting composite auto-update controls

Auto-update controls are never marked is loaded to prevent uvc_get_ctrl from
loading the control value from the cache. When setting a composite (mapped to
several V4L2 controls) auto-update UVC control, the driver updates the control
cache value before processing each V4L2 control, overwriting the previously
set V4L2 control.

This fixes the problem by marking all controls as loaded in uvc_set_ctrl
regardless of their type and resetting the loaded flag in uvc_commit_ctrl for
auto-update controls.

Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_ctrl.c