diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2013-12-05 18:44:29 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2013-12-05 21:24:05 +0100 |
commit | 11dce4f6eebd325e3d237aa9ad7d0ffa8559448f (patch) | |
tree | 18b60c9eef074c9a0355534e56af10198e381ca0 | |
parent | 941514e27470f7621b05757dfb793337c0a0c3b0 (diff) |
Integer64 and string controls can't be accessed using VIDIOC_[GS]_CTRL
So don't even try.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r-- | yavta.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -278,7 +278,8 @@ static int get_control(struct device *dev, unsigned int id, int type, *val = ctrl.value; return 0; } - if (errno == EINVAL || errno == ENOTTY) { + if (type != V4L2_CTRL_TYPE_INTEGER64 && type != V4L2_CTRL_TYPE_STRING && + (errno == EINVAL || errno == ENOTTY)) { struct v4l2_control old; old.id = id; @@ -322,7 +323,8 @@ static void set_control(struct device *dev, unsigned int id, int type, val = ctrl.value64; else val = ctrl.value; - } else if (errno == EINVAL || errno == ENOTTY) { + } else if (!is_64 && type != V4L2_CTRL_TYPE_STRING && + (errno == EINVAL || errno == ENOTTY)) { struct v4l2_control old; old.id = id; |