Merge tag 'mips_4.16_2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / dmx-munmap.rst
1 .. _dmx-munmap:
2
3 ************
4 DVB munmap()
5 ************
6
7 Name
8 ====
9
10 dmx-munmap - Unmap device memory
11
12 .. warning:: This API is still experimental.
13
14
15 Synopsis
16 ========
17
18 .. code-block:: c
19
20     #include <unistd.h>
21     #include <sys/mman.h>
22
23
24 .. c:function:: int munmap( void *start, size_t length )
25     :name: dmx-munmap
26
27 Arguments
28 =========
29
30 ``start``
31     Address of the mapped buffer as returned by the
32     :ref:`mmap() <dmx-mmap>` function.
33
34 ``length``
35     Length of the mapped buffer. This must be the same value as given to
36     :ref:`mmap() <dmx-mmap>`.
37
38
39 Description
40 ===========
41
42 Unmaps a previously with the :ref:`mmap() <dmx-mmap>` function mapped
43 buffer and frees it, if possible.
44
45
46 Return Value
47 ============
48
49 On success :ref:`munmap() <dmx-munmap>` returns 0, on failure -1 and the
50 ``errno`` variable is set appropriately:
51
52 EINVAL
53     The ``start`` or ``length`` is incorrect, or no buffers have been
54     mapped yet.