Message ID | cbf40e5e19dd65b2581b53e00103960c6254d9e1.1309260043.git.hans.verkuil@cisco.com (mailing list archive) |
---|---|
State | RFC |
Headers | show |
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index 63a44fd..1b0422e 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c @@ -2032,9 +2032,11 @@ void v4l2_ctrl_add_event(struct v4l2_ctrl *ctrl, if (ctrl->type != V4L2_CTRL_TYPE_CTRL_CLASS && (sev->flags & V4L2_EVENT_SUB_FL_SEND_INITIAL)) { struct v4l2_event ev; + u32 changes = V4L2_EVENT_CTRL_CH_FLAGS; - fill_event(&ev, ctrl, V4L2_EVENT_CTRL_CH_VALUE | - V4L2_EVENT_CTRL_CH_FLAGS); + if (!(ctrl->flags & V4L2_CTRL_FLAG_WRITE_ONLY)) + changes |= V4L2_EVENT_CTRL_CH_VALUE; + fill_event(&ev, ctrl, changes); v4l2_event_queue_fh(sev->fh, &ev); } v4l2_ctrl_unlock(ctrl);