diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2011-05-23 04:07:05 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 17:55:38 -0300 |
commit | fa4d7096d1fb7c012ebaacefee132007a21e0965 (patch) | |
tree | b33643476d3df4c675b7edaada6a0f35d3837272 /drivers/media/video/v4l2-common.c | |
parent | 1de5be5e91ee10d8f42be2aebc1cede718b48d50 (diff) | |
download | linux-fa4d7096d1fb7c012ebaacefee132007a21e0965.tar.gz linux-fa4d7096d1fb7c012ebaacefee132007a21e0965.tar.bz2 linux-fa4d7096d1fb7c012ebaacefee132007a21e0965.zip |
[media] v4l2-ctrls: add new bitmask control type
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-common.c')
-rw-r--r-- | drivers/media/video/v4l2-common.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 06b9f9f82013..5c6100fb4072 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c @@ -105,6 +105,9 @@ int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, menu_items[ctrl->value][0] == '\0') return -EINVAL; } + if (qctrl->type == V4L2_CTRL_TYPE_BITMASK && + (ctrl->value & ~qctrl->maximum)) + return -ERANGE; return 0; } EXPORT_SYMBOL(v4l2_ctrl_check); |