Some patches for DVB VB2 kAPI documentation
Subsystems (2)
cover Some patches for DVB VB2 kAPI documentation
Document the new dvb-vb2 kAPI bits, in order to keep it in sync with implementation, and shut up two new documentation warnings.
Mauro Carvalho Chehab (4):
media: dvb_vb2: use strlcpy instead of strncpy
media: dvb_vb2: get rid of DVB_BUF_TYPE_OUTPUT
media: dvb kAPI docs: document dvb_vb2.h
media: dmx.h documentation: fix a warning
Documentation/media/dmx.h.rst.exceptions | 2 + Documentation/media/kapi/dtv-common.rst | 5 + drivers/media/dvb-core/dvb_vb2.c | 2 +- include/media/dmxdev.h | 2 + include/media/dvb_vb2.h | 184 +++++++++++++++++++++++++++++-- 5 files changed, 187 insertions(+), 8 deletions(-)
Signature · 1 line
2.14.3
PATCH 1/4 media: dvb_vb2: use strlcpy instead of strncpy
Instead of using strncpy(), use strlcpy(), in order to ensure that a \0 char will be added at the end of the string.
--- drivers/media/dvb-core/dvb_vb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/dvb-core/dvb_vb2.c +1 -1
@@ -194,7 +194,7 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking)spin_lock_init (&ctx->slock);INIT_LIST_HEAD (&ctx->dvb_q); -strncpy (ctx->name, name,DVB_VB2_NAME_MAX ); +strlcpy (ctx->name, name,DVB_VB2_NAME_MAX ); ctx->nonblocking = nonblocking; ctx->state =DVB_VB2_STATE_INIT ;
Signature · 1 line
2.14.3
PATCH 2/4 media: dvb_vb2: get rid of DVB_BUF_TYPE_OUTPUT
In reply to Mauro Carvalho ChehabThis is currently unused. So, get rid of it.
--- include/media/dvb_vb2.h | 1 - 1 file changed, 1 deletion(-)
include/media/dvb_vb2.h +0 -1
@@ -24,7 +24,6 @@enum dvb_buf_type {DVB_BUF_TYPE_CAPTURE =1 , -DVB_BUF_TYPE_OUTPUT =2 , };#define DVB_VB2_STATE_NONE (0x0)
Signature · 1 line
2.14.3
PATCH 3/4 media: dvb kAPI docs: document dvb_vb2.h
In reply to Mauro Carvalho ChehabDocument the data structures and functions inside this kAPI header.
--- Documentation/media/kapi/dtv-common.rst | 5 + include/media/dmxdev.h | 2 + include/media/dvb_vb2.h | 183 ++++++++++++++++++++++++++++++-- 3 files changed, 184 insertions(+), 6 deletions(-)
Documentation/media/kapi/dtv-common.rst +5 -0
@@ -53,3 +53,8 @@ copy it from/to userspace. Two or more writers must be locked against each other. .. kernel-doc:: include/media/dvb_ringbuffer.h + +Digital TV VB2 handler +~~~~~~~~~~~~~~~~~~~~~~ + +.. kernel-doc:: include/media/dvb_vb2.h
include/media/dmxdev.h +2 -0
@@ -112,6 +112,7 @@ struct dmxdev_feed {* @state: state of the dmxdev filter, as defined by &enum dmxdev_state. * @dev: pointer to &struct dmxdev. * @buffer: an embedded &struct dvb_ringbuffer buffer. +* @vb2_ctx: control struct for VB2 handler * @mutex: protects the access to &struct dmxdev_filter. * @timer: &struct timer_list embedded timer, used to check for * feed timeouts.
@@ -165,6 +166,7 @@ struct dmxdev_filter {* @exit: flag to indicate that the demux is being released. * @dvr_orig_fe: pointer to &struct dmx_frontend. * @dvr_buffer: embedded &struct dvb_ringbuffer for DVB output. +* @dvr_vb2_ctx: control struct for VB2 handler * @mutex: protects the usage of this structure. * @lock: protects access to &dmxdev->filter->data. */
include/media/dvb_vb2.h +177 -6
228 lines not on this page · raw message
Signature · 1 line
2.14.3
PATCH 4/4 media: dmx.h documentation: fix a warning
In reply to Mauro Carvalho Chehab/devel/v4l/patchwork/Documentation/output/dmx.h.rst:6: WARNING: undefined label: dmx_dqbuf (if the link has no caption the label must precede a section header)
This is defined together with DMX_QBUF.
--- Documentation/media/dmx.h.rst.exceptions | 2 ++ 1 file changed, 2 insertions(+)
Documentation/media/dmx.h.rst.exceptions +2 -0
@@ -54,3 +54,5 @@ ignore symbol DMX_OUT_DECODER ignore symbol DMX_OUT_TAP ignore symbol DMX_OUT_TS_TAP ignore symbol DMX_OUT_TSDEMUX_TAP + +replace ioctl DMX_DQBUF dmx_qbuf
Signature · 1 line
2.14.3