]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l2-ioctl: check if an ioctl is valid
authorHans Verkuil <hans.verkuil@cisco.com>
Sun, 10 Mar 2013 16:12:25 +0000 (13:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 24 Mar 2013 15:01:26 +0000 (12:01 -0300)
commit8481a80a5dc604c7c1c031b3741be82923d8c288
tree16c3041e01fd356b9bf7ff65b890d9a86f0d45f6
parent4d2131a4f86b9b5bd75b53edebc4f8f187ca985c
[media] v4l2-ioctl: check if an ioctl is valid

Just checking if the op exists isn't correct, you should check if the ioctl
is valid (which implies that the op exists as well).
One exception is g_std: if current_norm is non-zero, then the g_std op may be
absent. This sort of weird behavior is one of the reasons why I am trying to
get rid of current_norm.
This patch fixes the case where the g/s_std op is set, but these ioctls are
disabled. This can happen in drivers supporting multiple models, some that
have TV input (and support the STD API) and some that have a sensor (and do
not support the STD API). In the latter case qv4l2 would still show the
Standards combobox.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/v4l2-core/v4l2-ioctl.c