Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / func-close.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _func-close:
4
5 ************
6 V4L2 close()
7 ************
8
9 Name
10 ====
11
12 v4l2-close - Close a V4L2 device
13
14
15 Synopsis
16 ========
17
18 .. code-block:: c
19
20     #include <unistd.h>
21
22
23 .. c:function:: int close( int fd )
24     :name: v4l2-close
25
26 Arguments
27 =========
28
29 ``fd``
30     File descriptor returned by :ref:`open() <func-open>`.
31
32
33 Description
34 ===========
35
36 Closes the device. Any I/O in progress is terminated and resources
37 associated with the file descriptor are freed. However data format
38 parameters, current input or output, control values or other properties
39 remain unchanged.
40
41
42 Return Value
43 ============
44
45 The function returns 0 on success, -1 on failure and the ``errno`` is
46 set appropriately. Possible error codes:
47
48 EBADF
49     ``fd`` is not a valid open file descriptor.