summaryrefslogtreecommitdiff
path: root/yavta.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2013-12-05 14:35:27 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-12-05 21:19:38 +0100
commit941514e27470f7621b05757dfb793337c0a0c3b0 (patch)
tree12b7bb2257297c143889daf5c7747f664c150732 /yavta.c
parent4f9076ef951738b1cf5bc3358b00d87d94d6d2b3 (diff)
Make VIDIOC_[GS]_CTRL work
v4l2_control.value was left uninitialised for the VIDIOC_S_CTRL IOCTL. Fix that. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'yavta.c')
-rw-r--r--yavta.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/yavta.c b/yavta.c
index 480ce74..cbcf310 100644
--- a/yavta.c
+++ b/yavta.c
@@ -326,6 +326,7 @@ static void set_control(struct device *dev, unsigned int id, int type,
struct v4l2_control old;
old.id = id;
+ old.value = val;
ret = ioctl(dev->fd, VIDIOC_S_CTRL, &old);
if (ret != -1)
val = old.value;