]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l2-ctrls: create type_ops
authorHans Verkuil <hans.verkuil@cisco.com>
Sun, 27 Apr 2014 06:22:17 +0000 (03:22 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 17 Jul 2014 14:56:47 +0000 (11:56 -0300)
commitd73d58ad0f8f00a8a96a684157912a2d604e5dbf
tree870aaec59c2a1f9328f582d5df1bce400a1f3b77
parent3efab5a4379eafe486f458f184816fa961792a81
[media] v4l2-ctrls: create type_ops

Since compound controls can have non-standard types we need to be able to do
type-specific checks etc. In order to make that easy type operations are added.
There are four operations:

- equal: check if two values are equal
- init: initialize a value
- log: log the value
- validate: validate a new value

The v4l2_ctrl struct adds p_new and p_cur unions at the end of the struct.
This union provides a standard way of accessing control types through a pointer,
which greatly simplifies internal control processing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/v4l2-ctrls.c
drivers/media/v4l2-core/v4l2-ioctl.c
include/media/v4l2-ctrls.h