summaryrefslogtreecommitdiff
path: root/yavta.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2013-12-05 18:44:29 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-12-05 21:24:05 +0100
commit11dce4f6eebd325e3d237aa9ad7d0ffa8559448f (patch)
tree18b60c9eef074c9a0355534e56af10198e381ca0 /yavta.c
parent941514e27470f7621b05757dfb793337c0a0c3b0 (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>
Diffstat (limited to 'yavta.c')
-rw-r--r--yavta.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/yavta.c b/yavta.c
index cbcf310..cfee473 100644
--- a/yavta.c
+++ b/yavta.c
@@ -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;