media: vb2: add init_buffer buffer op
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 1 Jun 2018 15:03:13 +0000 (11:03 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 31 Aug 2018 15:17:31 +0000 (11:17 -0400)
commit8e013700bc12806d80f31ebe360916987f0e03df
tree08f72f21ff13afaef584c4de98c28efcfb7add61
parent62fed26ff4338eeccc702799be358bbb1471b76c
media: vb2: add init_buffer buffer op

We need to initialize the request_fd field in struct vb2_v4l2_buffer
to -1 instead of the default of 0. So we need to add a new op that
is called when struct vb2_v4l2_buffer is allocated.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/common/videobuf2/videobuf2-core.c
include/media/videobuf2-core.h