doc-rst: customize RTD theme, captions & inline literal
[deliverable/linux.git] / Documentation / linux_tv / media / v4l / func-munmap.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _func-munmap:
4
5*************
6V4L2 munmap()
7*************
8
586027ce
MCC
9NAME
10====
5377d91f 11
586027ce 12v4l2-munmap - Unmap device memory
5377d91f 13
586027ce 14SYNOPSIS
5377d91f
MH
15========
16
17.. code-block:: c
18
19 #include <unistd.h>
20 #include <sys/mman.h>
21
22
b7e67f6c 23.. cpp:function:: int munmap( void *start, size_t length )
5377d91f 24
586027ce
MCC
25
26ARGUMENTS
5377d91f
MH
27=========
28
29``start``
30 Address of the mapped buffer as returned by the
31 :ref:`mmap() <func-mmap>` function.
32
33``length``
34 Length of the mapped buffer. This must be the same value as given to
760c7010 35 :ref:`mmap() <func-mmap>` and returned by the driver in the struct
5377d91f
MH
36 :ref:`v4l2_buffer <v4l2-buffer>` ``length`` field for the
37 single-planar API and in the struct
38 :ref:`v4l2_plane <v4l2-plane>` ``length`` field for the
39 multi-planar API.
40
41
586027ce 42DESCRIPTION
5377d91f
MH
43===========
44
45Unmaps a previously with the :ref:`mmap() <func-mmap>` function mapped
46buffer and frees it, if possible.
47
48
586027ce 49RETURN VALUE
5377d91f
MH
50============
51
760c7010 52On success :ref:`munmap() <func-munmap>` returns 0, on failure -1 and the
5377d91f
MH
53``errno`` variable is set appropriately:
54
55EINVAL
56 The ``start`` or ``length`` is incorrect, or no buffers have been
57 mapped yet.
This page took 0.032424 seconds and 5 git commands to generate.