Drivers can use the has_new field to determine if a new value was specified
for a control. The v4l2_ctrl_handler_setup() must always set this to 1 since
the setup has to force a full update of all controls.

Signed-off-by: Hans Verkuil <[email protected]>
---
 drivers/media/video/v4l2-ctrls.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
index 8f81efc..64f56bb 100644
--- a/drivers/media/video/v4l2-ctrls.c
+++ b/drivers/media/video/v4l2-ctrls.c
@@ -1280,8 +1280,10 @@ int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler 
*hdl)
                if (ctrl->done)
                        continue;
 
-               for (i = 0; i < master->ncontrols; i++)
+               for (i = 0; i < master->ncontrols; i++) {
                        cur_to_new(master->cluster[i]);
+                       master->cluster[i]->has_new = 1;
+               }
 
                /* Skip button controls and read-only controls. */
                if (ctrl->type == V4L2_CTRL_TYPE_BUTTON ||
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to