]> git.kernelconcepts.de Git - karo-tx-linux.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)
commita5e3d743cb6ed2d73546eaf070138202c0c64a6f
tree1d6618189bd6824d56e8eb8bdd76ff62863511ec
parent3d8b24d27808e6ab95eae70cb15315051a7f90eb
[media] vb2: regression fix: always set length field.

Commit dc77523c5da5513df1bbc74db2a522a94f4cec0e 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