]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l2-ctrls: v4l2_ctrl_add_handler should add all refs
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 2 Mar 2012 15:41:25 +0000 (12:41 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 8 Mar 2012 14:03:26 +0000 (11:03 -0300)
commit5e2ec708c56d1879135c875f3de8d56e6cca11db
treeffaf659f5b790a870ab216b4c9c077140f966d78
parentf99401bcf17dc1b775bc1733cc4cd34700d08e04
[media] v4l2-ctrls: v4l2_ctrl_add_handler should add all refs

Currently v4l2_ctrl_add_handler adds only the controls that are owned
by the handler. This is wrong. Instead all controls, whether owned or
not, should be added.

This is also implied by the v4l2-controls.txt documentation and it is
clearly the right thing to do. The only reason this was never noticed
before is because we never did this. Only recent changes in ivtv made
this error visible because there a third handler layer was added (handler
A inherits from handler B which inherits from C, D and E). Without this
change handler A only sees the controls owned by handler B and the controls
from C, D and E are missing.

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