diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2011-06-14 01:42:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:53:31 -0400 |
commit | c12fcfd676e16a82e47ee44fe2d13dc21717063a (patch) | |
tree | 005abc250b62c6e2d8c68fce4b256e1ace7c44d5 /drivers | |
parent | 2151bdc887acfd6dc2c931b4d3c01f95e30b7df8 (diff) |
[media] v4l2-ctrls: don't initially set CH_VALUE for write-only controls
When sending the SEND_INITIAL event for write-only controls the
V4L2_EVENT_CTRL_CH_VALUE flag should not be set. It's meaningless.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/v4l2-ctrls.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index a37e5bff4342..8fb020dd567b 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c | |||
@@ -2033,9 +2033,11 @@ void v4l2_ctrl_add_event(struct v4l2_ctrl *ctrl, | |||
2033 | if (ctrl->type != V4L2_CTRL_TYPE_CTRL_CLASS && | 2033 | if (ctrl->type != V4L2_CTRL_TYPE_CTRL_CLASS && |
2034 | (sev->flags & V4L2_EVENT_SUB_FL_SEND_INITIAL)) { | 2034 | (sev->flags & V4L2_EVENT_SUB_FL_SEND_INITIAL)) { |
2035 | struct v4l2_event ev; | 2035 | struct v4l2_event ev; |
2036 | u32 changes = V4L2_EVENT_CTRL_CH_FLAGS; | ||
2036 | 2037 | ||
2037 | fill_event(&ev, ctrl, V4L2_EVENT_CTRL_CH_VALUE | | 2038 | if (!(ctrl->flags & V4L2_CTRL_FLAG_WRITE_ONLY)) |
2038 | V4L2_EVENT_CTRL_CH_FLAGS); | 2039 | changes |= V4L2_EVENT_CTRL_CH_VALUE; |
2040 | fill_event(&ev, ctrl, changes); | ||
2039 | v4l2_event_queue_fh(sev->fh, &ev); | 2041 | v4l2_event_queue_fh(sev->fh, &ev); |
2040 | } | 2042 | } |
2041 | v4l2_ctrl_unlock(ctrl); | 2043 | v4l2_ctrl_unlock(ctrl); |