]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l2-ctrls: compare values only once
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 17 Jan 2014 11:25:26 +0000 (08:25 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 17 Jul 2014 14:57:16 +0000 (11:57 -0300)
commitd4b16b1c00ad30763b2779b9d077184e0876f2d3
treefd8a4887e9fafdd171cb734430511e5a67bf2844
parent5817489ddf1df26921807ed46c6865eee3db46c9
[media] v4l2-ctrls: compare values only once

When setting a control the control's new value is compared to the current
value twice: once by new_to_cur(), once by cluster_changed(). Not a big
deal when dealing with simple values, but it can be a problem when dealing
with compound types or arrays. So fix this: cluster_changed() sets the
has_changed flag, which is used by new_to_cur() instead of having to do
another compare.

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