1.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2.. c:namespace:: MC.request 3 4.. _request-func-close: 5 6*************** 7request close() 8*************** 9 10Name 11==== 12 13request-close - Close a request file descriptor 14 15Synopsis 16======== 17 18.. code-block:: c 19 20 #include <unistd.h> 21 22.. c:function:: int close( int fd ) 23 24Arguments 25========= 26 27``fd`` 28 File descriptor returned by :ref:`MEDIA_IOC_REQUEST_ALLOC`. 29 30Description 31=========== 32 33Closes the request file descriptor. Resources associated with the request 34are freed once all file descriptors associated with the request are closed 35and the driver has completed the request. 36See :ref:`here <media-request-life-time>` for more information. 37 38Return Value 39============ 40 41:c:func:`close()` returns 0 on success. On error, -1 is 42returned, and ``errno`` is set appropriately. Possible error codes are: 43 44EBADF 45 ``fd`` is not a valid open file descriptor. 46