media: videobuf2-core.h: improve buf_struct_size documentation
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 20 Feb 2020 09:34:26 +0000 (10:34 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 2 Mar 2020 14:27:25 +0000 (15:27 +0100)
Explicitly document that the driver-specific buffer structure
must start with the subsystem-specific struct (vb2_v4l2_buffer
in the case of V4L2).

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
include/media/videobuf2-core.h

index a2b2208b02da589794f34baf3d7ca115a958b51b..f11b96514cf725da971de88670d09e32c063ca80 100644 (file)
@@ -509,8 +509,11 @@ struct vb2_buf_ops {
  *             by the vb2 core.
  * @buf_struct_size: size of the driver-specific buffer structure;
  *             "0" indicates the driver doesn't want to use a custom buffer
- *             structure type. for example, ``sizeof(struct vb2_v4l2_buffer)``
- *             will be used for v4l2.
+ *             structure type. In that case a subsystem-specific struct
+ *             will be used (in the case of V4L2 that is
+ *             ``sizeof(struct vb2_v4l2_buffer)``). The first field of the
+ *             driver-specific buffer structure must be the subsystem-specific
+ *             struct (vb2_v4l2_buffer in the case of V4L2).
  * @timestamp_flags: Timestamp flags; ``V4L2_BUF_FLAG_TIMESTAMP_*`` and
  *             ``V4L2_BUF_FLAG_TSTAMP_SRC_*``
  * @gfp_flags: additional gfp flags used when allocating the buffers.