]> git.baikalelectronics.ru Git - kernel.git/commit
[media] vb2: regression fix: always set length field.
authorHans Verkuil <hansverk@cisco.com>
Wed, 4 Dec 2013 14:14:05 +0000 (15:14 +0100)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 10 Dec 2013 07:40:57 +0000 (05:40 -0200)
commit84f442ca0b2cd978bff033384b7e2de452573c2c
tree1d6618189bd6824d56e8eb8bdd76ff62863511ec
parent8b9a6eaee66220ca7ca795fd7769915a23541c34
[media] vb2: regression fix: always set length field.

Commit d6a09fb388390276fce3ab40e2231a5947f61eba ensured that m.offset is
only set for the MMAP memory mode by calling __setup_offsets only for that
mode.

However, __setup_offsets also initializes the length fields, and that should
be done regardless of the memory mode. Because of that change the v4l2-ctl
test application fails for the USERPTR mode.

This fix creates a __setup_lengths function that sets the length, and
__setup_offsets just sets the offset and no longer touches the length.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
drivers/media/v4l2-core/videobuf2-core.c