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