Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: videobuf2-core.h: improve buf_struct_size documentation

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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
1583c793 6af5bcd3

+5 -2
+5 -2
include/media/videobuf2-core.h
··· 509 509 * by the vb2 core. 510 510 * @buf_struct_size: size of the driver-specific buffer structure; 511 511 * "0" indicates the driver doesn't want to use a custom buffer 512 - * structure type. for example, ``sizeof(struct vb2_v4l2_buffer)`` 513 - * will be used for v4l2. 512 + * structure type. In that case a subsystem-specific struct 513 + * will be used (in the case of V4L2 that is 514 + * ``sizeof(struct vb2_v4l2_buffer)``). The first field of the 515 + * driver-specific buffer structure must be the subsystem-specific 516 + * struct (vb2_v4l2_buffer in the case of V4L2). 514 517 * @timestamp_flags: Timestamp flags; ``V4L2_BUF_FLAG_TIMESTAMP_*`` and 515 518 * ``V4L2_BUF_FLAG_TSTAMP_SRC_*`` 516 519 * @gfp_flags: additional gfp flags used when allocating the buffers.