]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l2-ioctl: allow all controls if ctrl_class == 0
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 14 Mar 2015 16:28:25 +0000 (13:28 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 2 Apr 2015 21:30:36 +0000 (18:30 -0300)
commit3bbc5c52983ba4f0c54cb6c4c0e97d2b19e6901d
tree6d52ea1fc2f71cad1010a90fd0baa1f1750fd175
parent38bc87ae8f544c26ba7420dbd17dc8efe201414f
[media] v4l2-ioctl: allow all controls if ctrl_class == 0

The check_ext_ctrls() function in v4l2-ioctl.c checks if all controls in the
control array are from the same control class as c->ctrl_class. However,
that check should only be done if c->ctrl_class != 0. A 0 value means
that this restriction does not apply.

So return 1 (OK) if c->ctrl_class == 0.

Found by running v4l2-compliance on the uvc driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/v4l2-ioctl.c