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

[media] libv4l-introdution.rst: fix function definitions

c:type is not the right tag for function definitions.
Replace them by .. c:function::

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

+35 -27
+35 -27
Documentation/media/uapi/v4l/libv4l-introduction.rst
··· 116 116 Those functions operate just like glibc 117 117 open/close/dup/ioctl/read/mmap/munmap: 118 118 119 - - :c:type:`int v4l2_open(const char *file, int oflag, ...)` - operates like the 120 - standard :ref:`open() <func-open>` function. 119 + .. c:function:: int v4l2_open(const char *file, int oflag, ...) 121 120 122 - - :c:type:`int v4l2_close(int fd)` - operates like the standard 123 - :ref:`close() <func-close>` function. 121 + operates like the standard :ref:`open() <func-open>` function. 124 122 125 - - :c:type:`int v4l2_dup(int fd)` - operates like the standard dup() function, 126 - duplicating a file handler. 123 + .. c:function:: int v4l2_close(int fd) 127 124 128 - - :c:type:`int v4l2_ioctl (int fd, unsigned long int request, ...)` - operates 129 - like the standard :ref:`ioctl() <func-ioctl>` function. 125 + operates like the standard :ref:`close() <func-close>` function. 130 126 131 - - :c:type:`int v4l2_read (int fd, void* buffer, size_t n)` - operates like the 132 - standard :ref:`read() <func-read>` function. 127 + .. c:function:: int v4l2_dup(int fd) 133 128 134 - - :c:type:`void v4l2_mmap(void *start, size_t length, int prot, int flags, int 135 - fd, int64_t offset);` - operates like the standard 136 - :ref:`mmap() <func-mmap>` function. 129 + operates like the standard dup() function, duplicating a file handler. 137 130 138 - - :c:type:`int v4l2_munmap(void *_start, size_t length);` - operates like the 139 - standard :ref:`munmap() <func-munmap>` function. 131 + .. c:function:: int v4l2_ioctl (int fd, unsigned long int request, ...) 132 + 133 + operates like the standard :ref:`ioctl() <func-ioctl>` function. 134 + 135 + .. c:function:: int v4l2_read (int fd, void* buffer, size_t n) 136 + 137 + operates like the standard :ref:`read() <func-read>` function. 138 + 139 + .. c:function:: void v4l2_mmap(void *start, size_t length, int prot, int flags, int fd, int64_t offset); 140 + 141 + operates like the standard :ref:`mmap() <func-mmap>` function. 142 + 143 + .. c:function:: int v4l2_munmap(void *_start, size_t length); 144 + operates like the standard :ref:`munmap() <func-munmap>` function. 140 145 141 146 Those functions provide additional control: 142 147 143 - - :c:type:`int v4l2_fd_open(int fd, int v4l2_flags)` - opens an already opened 144 - fd for further use through v4l2lib and possibly modify libv4l2's 145 - default behavior through the v4l2_flags argument. Currently, 146 - v4l2_flags can be ``V4L2_DISABLE_CONVERSION``, to disable format 147 - conversion. 148 + .. c:function:: int v4l2_fd_open(int fd, int v4l2_flags) 148 149 149 - - :c:type:`int v4l2_set_control(int fd, int cid, int value)` - This function 150 - takes a value of 0 - 65535, and then scales that range to the actual 151 - range of the given v4l control id, and then if the cid exists and is 150 + opens an already opened fd for further use through v4l2lib and possibly 151 + modify libv4l2's default behavior through the v4l2_flags argument. 152 + Currently, v4l2_flags can be ``V4L2_DISABLE_CONVERSION``, to disable 153 + format conversion. 154 + 155 + .. c:function:: int v4l2_set_control(int fd, int cid, int value) 156 + 157 + This function takes a value of 0 - 65535, and then scales that range to the 158 + actual range of the given v4l control id, and then if the cid exists and is 152 159 not locked sets the cid to the scaled value. 153 160 154 - - :c:type:`int v4l2_get_control(int fd, int cid)` - This function returns a 155 - value of 0 - 65535, scaled to from the actual range of the given v4l 156 - control id. when the cid does not exist, could not be accessed for 157 - some reason, or some error occurred 0 is returned. 161 + .. c:function:: int v4l2_get_control(int fd, int cid) 162 + 163 + This function returns a value of 0 - 65535, scaled to from the actual range 164 + of the given v4l control id. when the cid does not exist, could not be 165 + accessed for some reason, or some error occurred 0 is returned. 158 166 159 167 160 168 v4l1compat.so wrapper library