Merge tag 'usercopy-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
[cascardo/linux.git] / Documentation / media / uapi / cec / cec-func-close.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _cec-func-close:
4
5 ***********
6 cec close()
7 ***********
8
9 Name
10 ====
11
12 cec-close - Close a cec device
13
14
15 Synopsis
16 ========
17
18 .. code-block:: c
19
20     #include <unistd.h>
21
22
23 .. cpp:function:: int close( int fd )
24
25 Arguments
26 =========
27
28 ``fd``
29     File descriptor returned by :ref:`open() <func-open>`.
30
31
32 Description
33 ===========
34
35 .. note:: This documents the proposed CEC API. This API is not yet finalized
36    and is currently only available as a staging kernel module.
37
38 Closes the cec device. Resources associated with the file descriptor are
39 freed. The device configuration remain unchanged.
40
41
42 Return Value
43 ============
44
45 :c:func:`close()` returns 0 on success. On error, -1 is returned, and
46 ``errno`` is set appropriately. Possible error codes are:
47
48 ``EBADF``
49     ``fd`` is not a valid open file descriptor.