Commit 760c7010 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

doc-rst: linux_tv: avoid using c:func::



Using auto-generated links is dangerous, as there are multiple
definitions for syscalls (at least one on each book part).

So, reference them by their explicit reference.

I used this small script to help writing this patch:

for i in $(git grep -l "c:func:"); do perl -ne 's/\:c\:func:\`(open|close|read|poll|write|select|mmap|munmap|ioctl)\(\)`/:ref:`$1() <func-$1>`/; print $_' < $i >a && mv a $i; done

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 5d2b3f12
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -72,8 +72,9 @@ that possible.
Return Value
============

On success :c:func:`open()` returns the new file descriptor. On error
-1 is returned, and the ``errno`` variable is set appropriately.
On success :ref:`open() <frontend_f_open>` returns the new file descriptor.
On error, -1 is returned, and the ``errno`` variable is set appropriately.

Possible error codes are:

EACCES
+1 −1
Original line number Diff line number Diff line
@@ -146,4 +146,4 @@ outputted buffers.
Drivers implementing DMABUF importing I/O must support the
``VIDIOC_REQBUFS``, ``VIDIOC_QBUF``, ``VIDIOC_DQBUF``,
``VIDIOC_STREAMON`` and ``VIDIOC_STREAMOFF`` ioctls, and the
:c:func:`select()` and :c:func:`poll()` functions.
:ref:`select() <func-select>` and :ref:`poll() <func-poll>` functions.
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ Arguments
Description
===========

The :c:func:`ioctl()` function is used to program V4L2 devices. The
The :ref:`ioctl() <func-ioctl>` function is used to program V4L2 devices. The
argument ``fd`` must be an open file descriptor. An ioctl ``request``
has encoded in it whether the argument is an input, output or read/write
parameter, and the size of the argument ``argp`` in bytes. Macros and
+4 −4
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ Arguments
    module, which is used by the bttv, saa7134, saa7146, cx88 and vivi
    driver supports only ``PROT_READ`` | ``PROT_WRITE``. When the
    driver does not support the desired protection the
    :c:func:`mmap()` function fails.
    :ref:`mmap() <func-mmap>` function fails.

    Note device memory accesses (e. g. the memory on a graphics card
    with video capturing hardware) may incur a performance penalty
@@ -65,7 +65,7 @@ Arguments

    ``MAP_FIXED`` requests that the driver selects no other address than
    the one specified. If the specified address cannot be used,
    :c:func:`mmap()` will fail. If ``MAP_FIXED`` is specified,
    :ref:`mmap() <func-mmap>` will fail. If ``MAP_FIXED`` is specified,
    ``start`` must be a multiple of the pagesize. Use of this option is
    discouraged.

@@ -92,7 +92,7 @@ Arguments
Description
===========

The :c:func:`mmap()` function asks to map ``length`` bytes starting at
The :ref:`mmap() <func-mmap>` function asks to map ``length`` bytes starting at
``offset`` in the memory of the device specified by ``fd`` into the
application address space, preferably at address ``start``. This latter
address is a hint only, and is usually specified as 0.
@@ -108,7 +108,7 @@ To unmap buffers the :ref:`munmap() <func-munmap>` function is used.
Return Value
============

On success :c:func:`mmap()` returns a pointer to the mapped buffer. On
On success :ref:`mmap() <func-mmap>` returns a pointer to the mapped buffer. On
error ``MAP_FAILED`` (-1) is returned, and the ``errno`` variable is set
appropriately. Possible error codes are:

+2 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ Arguments

``length``
    Length of the mapped buffer. This must be the same value as given to
    :c:func:`mmap()` and returned by the driver in the struct
    :ref:`mmap() <func-mmap>` and returned by the driver in the struct
    :ref:`v4l2_buffer <v4l2-buffer>` ``length`` field for the
    single-planar API and in the struct
    :ref:`v4l2_plane <v4l2-plane>` ``length`` field for the
@@ -48,7 +48,7 @@ buffer and frees it, if possible.
Return Value
============

On success :c:func:`munmap()` returns 0, on failure -1 and the
On success :ref:`munmap() <func-munmap>` returns 0, on failure -1 and the
``errno`` variable is set appropriately:

EINVAL
Loading