sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget,/translations/zh_CN/driver-api/media/v4l2-fhmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/zh_TW/driver-api/media/v4l2-fhmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/it_IT/driver-api/media/v4l2-fhmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ja_JP/driver-api/media/v4l2-fhmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ko_KR/driver-api/media/v4l2-fhmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/pt_BR/driver-api/media/v4l2-fhmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/sp_SP/driver-api/media/v4l2-fhmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhF/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh.rsthKubhsection)}(hhh](htitle)}(hV4L2 File handlesh]hV4L2 File handles}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hstruct v4l2_fh provides a way to easily keep file handle specific data that is used by the V4L2 framework. Its usage is mandatory in all drivers.h]hstruct v4l2_fh provides a way to easily keep file handle specific data that is used by the V4L2 framework. Its usage is mandatory in all drivers.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXstruct v4l2_fh is allocated in the driver's ``open()`` file operation handler. It is typically embedded in a larger driver-specific structure. The :c:type:`v4l2_fh` must be initialized with a call to :c:func:`v4l2_fh_init`, and added to the video device with :c:func:`v4l2_fh_add`. This associates the :c:type:`v4l2_fh` with the :c:type:`file` by setting ``file->private_data`` to point to the :c:type:`v4l2_fh`.h](h.struct v4l2_fh is allocated in the driver’s }(hhhhhNhNubhliteral)}(h ``open()``h]hopen()}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh] file operation handler. It is typically embedded in a larger driver-specific structure. The }(hhhhhNhNubh)}(h:c:type:`v4l2_fh`h]h)}(hj h]hv4l2_fh}(hj hhhNhNubah}(h]h ](xrefcc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocdriver-api/media/v4l2-fh refdomainjreftypetype refexplicitrefwarn reftargetv4l2_fhuh1hhhhK hhubh$ must be initialized with a call to }(hhhhhNhNubh)}(h:c:func:`v4l2_fh_init`h]h)}(hj2h]hv4l2_fh_init()}(hj4hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj* v4l2_fh_inituh1hhhhK hhubh%, and added to the video device with }(hhhhhNhNubh)}(h:c:func:`v4l2_fh_add`h]h)}(hjUh]h v4l2_fh_add()}(hjWhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhjSubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj* v4l2_fh_adduh1hhhhK hhubh. This associates the }(hhhhhNhNubh)}(h:c:type:`v4l2_fh`h]h)}(hjxh]hv4l2_fh}(hjzhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjvubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhK hhubh with the }(hhhhhNhNubh)}(h:c:type:`file`h]h)}(hjh]hfile}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*fileuh1hhhhK hhubh by setting }(hhhhhNhNubh)}(h``file->private_data``h]hfile->private_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh to point to the }(hhhhhNhNubh)}(h:c:type:`v4l2_fh`h]h)}(hjh]hv4l2_fh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhK hhubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hSimilarly, the struct v4l2_fh is freed in the driver's ``release()`` file operation handler. It must be removed from the video device with :c:func:`v4l2_fh_del` and cleaned up with :c:func:`v4l2_fh_exit` before being freed.h](h9Similarly, the struct v4l2_fh is freed in the driver’s }(hjhhhNhNubh)}(h ``release()``h]h release()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhG file operation handler. It must be removed from the video device with }(hjhhhNhNubh)}(h:c:func:`v4l2_fh_del`h]h)}(hjh]h v4l2_fh_del()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj* v4l2_fh_deluh1hhhhKhjubh and cleaned up with }(hjhhhNhNubh)}(h:c:func:`v4l2_fh_exit`h]h)}(hj6h]hv4l2_fh_exit()}(hj8hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj* v4l2_fh_exituh1hhhhKhjubh before being freed.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hDrivers must not access ``file->private_data`` directly. They can retrieve the :c:type:`v4l2_fh` associated with a :c:type:`file` by calling :c:func:`file_to_v4l2_fh`. Drivers can extract their own file handle structure by using the container_of macro.h](hDrivers must not access }(hj]hhhNhNubh)}(h``file->private_data``h]hfile->private_data}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]ubh! directly. They can retrieve the }(hj]hhhNhNubh)}(h:c:type:`v4l2_fh`h]h)}(hjyh]hv4l2_fh}(hj{hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjwubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKhj]ubh associated with a }(hj]hhhNhNubh)}(h:c:type:`file`h]h)}(hjh]hfile}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*fileuh1hhhhKhj]ubh by calling }(hj]hhhNhNubh)}(h:c:func:`file_to_v4l2_fh`h]h)}(hjh]hfile_to_v4l2_fh()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj*file_to_v4l2_fhuh1hhhhKhj]ubhV. Drivers can extract their own file handle structure by using the container_of macro.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hExample:h]hExample:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh literal_block)}(hXstruct my_fh { int blah; struct v4l2_fh fh; }; ... int my_open(struct file *file) { struct my_fh *my_fh; struct video_device *vfd; int ret; ... my_fh = kzalloc(sizeof(*my_fh), GFP_KERNEL); ... v4l2_fh_init(&my_fh->fh, vfd); ... v4l2_fh_add(&my_fh->fh, file); return 0; } int my_release(struct file *file) { struct v4l2_fh *fh = file_to_v4l2_fh(file); struct my_fh *my_fh = container_of(fh, struct my_fh, fh); ... v4l2_fh_del(&my_fh->fh, file); v4l2_fh_exit(&my_fh->fh); kfree(my_fh); return 0; }h]hXstruct my_fh { int blah; struct v4l2_fh fh; }; ... int my_open(struct file *file) { struct my_fh *my_fh; struct video_device *vfd; int ret; ... my_fh = kzalloc(sizeof(*my_fh), GFP_KERNEL); ... v4l2_fh_init(&my_fh->fh, vfd); ... v4l2_fh_add(&my_fh->fh, file); return 0; } int my_release(struct file *file) { struct v4l2_fh *fh = file_to_v4l2_fh(file); struct my_fh *my_fh = container_of(fh, struct my_fh, fh); ... v4l2_fh_del(&my_fh->fh, file); v4l2_fh_exit(&my_fh->fh); kfree(my_fh); return 0; }}hjsbah}(h]h ]h"]h$]h&]hhƌforcelanguagejhighlight_args}uh1jhhhKhhhhubh)}(hEBelow is a short description of the :c:type:`v4l2_fh` functions used:h](h$Below is a short description of the }(hjhhhNhNubh)}(h:c:type:`v4l2_fh`h]h)}(hjh]hv4l2_fh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKEhjubh functions used:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKEhhhhubh)}(h]:c:func:`v4l2_fh_init ` (:c:type:`fh `, :c:type:`vdev `)h](h)}(h%:c:func:`v4l2_fh_init `h]h)}(hj?h]h v4l2_fh_init}(hjAhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhj=ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj* v4l2_fh_inituh1hhhhKGhj9ubh (}(hj9hhhNhNubh)}(h:c:type:`fh `h]h)}(hjbh]hfh}(hjdhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj`ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKGhj9ubh, }(hj9hhhNhNubh)}(h:c:type:`vdev `h]h)}(hjh]hvdev}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj* video_deviceuh1hhhhKGhj9ubh)}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKGhhhhubh bullet_list)}(hhh]h list_item)}(hwInitialise the file handle. This **MUST** be performed in the driver's :c:type:`v4l2_file_operations`->open() handler. h]h)}(hvInitialise the file handle. This **MUST** be performed in the driver's :c:type:`v4l2_file_operations`->open() handler.h](h!Initialise the file handle. This }(hjhhhNhNubhstrong)}(h**MUST**h]hMUST}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh be performed in the driver’s }(hjhhhNhNubh)}(h:c:type:`v4l2_file_operations`h]h)}(hjh]hv4l2_file_operations}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_file_operationsuh1hhhhKJhjubh->open() handler.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKJhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubah}(h]h ]h"]h$]h&]bullet-uh1jhhhKJhhhhubh)}(hP:c:func:`v4l2_fh_add ` (:c:type:`fh `, struct file \*filp)h](h)}(h#:c:func:`v4l2_fh_add `h]h)}(hjh]h v4l2_fh_add}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj* v4l2_fh_adduh1hhhhKMhj ubh (}(hj hhhNhNubh)}(h:c:type:`fh `h]h)}(hj3h]hfh}(hj5hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKMhj ubh, struct file *filp)}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKMhhhhubj)}(hhh]j)}(hAdd a :c:type:`v4l2_fh` to :c:type:`video_device` file handle list. Must be called once the file handle is completely initialized. h]h)}(hAdd a :c:type:`v4l2_fh` to :c:type:`video_device` file handle list. Must be called once the file handle is completely initialized.h](hAdd a }(hjahhhNhNubh)}(h:c:type:`v4l2_fh`h]h)}(hjkh]hv4l2_fh}(hjmhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjiubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKPhjaubh to }(hjahhhNhNubh)}(h:c:type:`video_device`h]h)}(hjh]h video_device}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj* video_deviceuh1hhhhKPhjaubhQ file handle list. Must be called once the file handle is completely initialized.}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKPhj]ubah}(h]h ]h"]h$]h&]uh1jhjZhhhhhNubah}(h]h ]h"]h$]h&]jj uh1jhhhKPhhhhubh)}(hP:c:func:`v4l2_fh_del ` (:c:type:`fh `, struct file \*filp)h](h)}(h#:c:func:`v4l2_fh_del `h]h)}(hjh]h v4l2_fh_del}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj* v4l2_fh_deluh1hhhhKShjubh (}(hjhhhNhNubh)}(h:c:type:`fh `h]h)}(hjh]hfh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKShjubh, struct file *filp)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKShhhhubj)}(hhh]j)}(hjUnassociate the file handle from :c:type:`video_device`. The file handle exit function may now be called. h]h)}(hiUnassociate the file handle from :c:type:`video_device`. The file handle exit function may now be called.h](h!Unassociate the file handle from }(hjhhhNhNubh)}(h:c:type:`video_device`h]h)}(hj"h]h video_device}(hj$hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj* video_deviceuh1hhhhKVhjubh2. The file handle exit function may now be called.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKVhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubah}(h]h ]h"]h$]h&]jj uh1jhhhKVhhhhubh)}(h>:c:func:`v4l2_fh_exit ` (:c:type:`fh `)h](h)}(h%:c:func:`v4l2_fh_exit `h]h)}(hj[h]h v4l2_fh_exit}(hj]hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhjYubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj* v4l2_fh_exituh1hhhhKYhjUubh (}(hjUhhhNhNubh)}(h:c:type:`fh `h]h)}(hj~h]hfh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj|ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKYhjUubh)}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKYhhhhubj)}(hhh]j)}(h`Uninitialise the file handle. After uninitialisation the :c:type:`v4l2_fh` memory can be freed. h]h)}(h_Uninitialise the file handle. After uninitialisation the :c:type:`v4l2_fh` memory can be freed.h](h9Uninitialise the file handle. After uninitialisation the }(hjhhhNhNubh)}(h:c:type:`v4l2_fh`h]h)}(hjh]hv4l2_fh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhK\hjubh memory can be freed.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK\hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubah}(h]h ]h"]h$]h&]jj uh1jhhhK\hhhhubh)}(h@:c:func:`file_to_v4l2_fh ` (struct file \*filp)h](h)}(h+:c:func:`file_to_v4l2_fh `h]h)}(hjh]hfile_to_v4l2_fh}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj*file_to_v4l2_fhuh1hhhhK_hjubh (struct file *filp)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK_hhhhubj)}(hhh]j)}(hJRetrieve the :c:type:`v4l2_fh` instance associated with a :c:type:`file`. h]h)}(hIRetrieve the :c:type:`v4l2_fh` instance associated with a :c:type:`file`.h](h Retrieve the }(hjhhhNhNubh)}(h:c:type:`v4l2_fh`h]h)}(hj'h]hv4l2_fh}(hj)hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj%ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKbhjubh instance associated with a }(hjhhhNhNubh)}(h:c:type:`file`h]h)}(hjJh]hfile}(hjLhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjHubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*fileuh1hhhhKbhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKbhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubah}(h]h ]h"]h$]h&]jj uh1jhhhKbhhhhubh)}(hKIf struct v4l2_fh is not embedded, then you can use these helper functions:h]hKIf struct v4l2_fh is not embedded, then you can use these helper functions:}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhhhhubh)}(h::c:func:`v4l2_fh_open ` (struct file \*filp)h](h)}(h%:c:func:`v4l2_fh_open `h]h)}(hjh]h v4l2_fh_open}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj* v4l2_fh_openuh1hhhhKfhjubh (struct file *filp)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKfhhhhubj)}(hhh]j)}(hxThis allocates a struct v4l2_fh, initializes it and adds it to the struct video_device associated with the file struct. h]h)}(hwThis allocates a struct v4l2_fh, initializes it and adds it to the struct video_device associated with the file struct.h]hwThis allocates a struct v4l2_fh, initializes it and adds it to the struct video_device associated with the file struct.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubah}(h]h ]h"]h$]h&]jj uh1jhhhKihhhhubh)}(h@:c:func:`v4l2_fh_release ` (struct file \*filp)h](h)}(h+:c:func:`v4l2_fh_release `h]h)}(hjh]hv4l2_fh_release}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj*v4l2_fh_releaseuh1hhhhKlhjubh (struct file *filp)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKlhhhhubj)}(hhh]j)}(hThis deletes it from the struct video_device associated with the file struct, uninitialised the :c:type:`v4l2_fh` and frees it. h]h)}(hThis deletes it from the struct video_device associated with the file struct, uninitialised the :c:type:`v4l2_fh` and frees it.h](h`This deletes it from the struct video_device associated with the file struct, uninitialised the }(hj hhhNhNubh)}(h:c:type:`v4l2_fh`h]h)}(hjh]hv4l2_fh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKohj ubh and frees it.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKohj ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubah}(h]h ]h"]h$]h&]jj uh1jhhhKohhhhubh)}(hcThese two functions can be plugged into the v4l2_file_operation's ``open()`` and ``release()`` ops.h](hDThese two functions can be plugged into the v4l2_file_operation’s }(hjJhhhNhNubh)}(h ``open()``h]hopen()}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJubh and }(hjJhhhNhNubh)}(h ``release()``h]h release()}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJubh ops.}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKrhhhhubh)}(hSeveral drivers need to do something when the first file handle is opened and when the last file handle closes. Two helper functions were added to check whether the :c:type:`v4l2_fh` struct is the only open filehandle of the associated device node:h](hSeveral drivers need to do something when the first file handle is opened and when the last file handle closes. Two helper functions were added to check whether the }(hj|hhhNhNubh)}(h:c:type:`v4l2_fh`h]h)}(hjh]hv4l2_fh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKuhj|ubhB struct is the only open filehandle of the associated device node:}(hj|hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKuhhhhubh)}(hL:c:func:`v4l2_fh_is_singular ` (:c:type:`fh `)h](h)}(h3:c:func:`v4l2_fh_is_singular `h]h)}(hjh]hv4l2_fh_is_singular}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj*v4l2_fh_is_singularuh1hhhhKzhjubh (}(hjhhhNhNubh)}(h:c:type:`fh `h]h)}(hjh]hfh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj*v4l2_fhuh1hhhhKzhjubh)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKzhhhhubj)}(hhh]j)}(hCReturns 1 if the file handle is the only open file handle, else 0. h]h)}(hBReturns 1 if the file handle is the only open file handle, else 0.h]hBReturns 1 if the file handle is the only open file handle, else 0.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK}hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubah}(h]h ]h"]h$]h&]jj uh1jhhhK}hhhhubh)}(hR:c:func:`v4l2_fh_is_singular_file ` (struct file \*filp)h](h)}(h=:c:func:`v4l2_fh_is_singular_file `h]h)}(hj$h]hv4l2_fh_is_singular_file}(hj&hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypefunc refexplicitrefwarnj*v4l2_fh_is_singular_fileuh1hhhhKhjubh (struct file *filp)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(hhh]j)}(hASame, but it calls v4l2_fh_is_singular with filp->private_data. h]h)}(h?Same, but it calls v4l2_fh_is_singular with filp->private_data.h]h?Same, but it calls v4l2_fh_is_singular with filp->private_data.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjNubah}(h]h ]h"]h$]h&]uh1jhjKhhhhhNubah}(h]h ]h"]h$]h&]jj uh1jhhhKhhhhubh)}(hhh](h)}(h%V4L2 fh functions and data structuresh]h%V4L2 fh functions and data structures}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlev4l2_fh (C struct) c.v4l2_fhhNtauh1j}hjlhhhNhNubhdesc)}(hhh](hdesc_signature)}(hv4l2_fhh]hdesc_signature_line)}(hstruct v4l2_fhh](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhKubh desc_name)}(hv4l2_fhh]h desc_sig_name)}(hjh]hv4l2_fh}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jsphinx_line_type declaratorhjhhhjhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhKhjhhubh desc_content)}(hhh]h)}(hDescribes a V4L2 file handlerh]hDescribes a V4L2 file handler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]domainjobjtypej desctypej noindex noindexentrynocontentsentryuh1jhhhjlhNhNubh container)}(hX **Definition**:: struct v4l2_fh { struct list_head list; struct video_device *vdev; struct v4l2_ctrl_handler *ctrl_handler; enum v4l2_priority prio; wait_queue_head_t wait; struct mutex subscribe_lock; struct list_head subscribed; struct list_head available; unsigned int navailable; u32 sequence; struct v4l2_m2m_ctx *m2m_ctx; }; **Members** ``list`` list of file handlers ``vdev`` pointer to :c:type:`struct video_device ` ``ctrl_handler`` pointer to :c:type:`struct v4l2_ctrl_handler ` ``prio`` priority of the file handler, as defined by :c:type:`enum v4l2_priority ` ``wait`` event' s wait queue ``subscribe_lock`` serialise changes to the subscribed list; guarantee that the add and del event callbacks are orderly called ``subscribed`` list of subscribed events ``available`` list of events waiting to be dequeued ``navailable`` number of available events at **available** list ``sequence`` event sequence number ``m2m_ctx`` pointer to :c:type:`struct v4l2_m2m_ctx `h](h block_quote)}(hX**Definition**:: struct v4l2_fh { struct list_head list; struct video_device *vdev; struct v4l2_ctrl_handler *ctrl_handler; enum v4l2_priority prio; wait_queue_head_t wait; struct mutex subscribe_lock; struct list_head subscribed; struct list_head available; unsigned int navailable; u32 sequence; struct v4l2_m2m_ctx *m2m_ctx; }; h](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj' ubh:}(hj' hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhj# ubj)}(hXstruct v4l2_fh { struct list_head list; struct video_device *vdev; struct v4l2_ctrl_handler *ctrl_handler; enum v4l2_priority prio; wait_queue_head_t wait; struct mutex subscribe_lock; struct list_head subscribed; struct list_head available; unsigned int navailable; u32 sequence; struct v4l2_m2m_ctx *m2m_ctx; };h]hXstruct v4l2_fh { struct list_head list; struct video_device *vdev; struct v4l2_ctrl_handler *ctrl_handler; enum v4l2_priority prio; wait_queue_head_t wait; struct mutex subscribe_lock; struct list_head subscribed; struct list_head available; unsigned int navailable; u32 sequence; struct v4l2_m2m_ctx *m2m_ctx; };}hjD sbah}(h]h ]h"]h$]h&]hhuh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhj# ubeh}(h]h ]h"]h$]h&]uh1j! hjC hKhj ubh)}(h **Members**h]j)}(hj[ h]hMembers}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjY ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK-hj ubhdefinition_list)}(hhh](hdefinition_list_item)}(h``list`` list of file handlers h](hterm)}(h``list``h]h)}(hj h]hlist}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~ ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjx ubh definition)}(hhh]h)}(hlist of file handlersh]hlist of file handlers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hjx ubeh}(h]h ]h"]h$]h&]uh1jv hj hKhjs ubjw )}(hA``vdev`` pointer to :c:type:`struct video_device ` h](j} )}(h``vdev``h]h)}(hj h]hvdev}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhj ubj )}(hhh]h)}(h7pointer to :c:type:`struct video_device `h](h pointer to }(hj hhhNhNubh)}(h,:c:type:`struct video_device `h]h)}(hj h]hstruct video_device}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sbj* video_deviceuh1hhj hKhj ubeh}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jv hj hKhjs ubjw )}(hS``ctrl_handler`` pointer to :c:type:`struct v4l2_ctrl_handler ` h](j} )}(h``ctrl_handler``h]h)}(hj h]h ctrl_handler}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhj ubj )}(hhh]h)}(hApointer to :c:type:`struct v4l2_ctrl_handler `h](h pointer to }(hj4 hhhNhNubh)}(h6:c:type:`struct v4l2_ctrl_handler `h]h)}(hj> h]hstruct v4l2_ctrl_handler}(hj@ hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj< ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_ctrl_handleruh1hhj0 hKhj4 ubeh}(h]h ]h"]h$]h&]uh1hhj0 hKhj1 ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jv hj0 hKhjs ubjw )}(hb``prio`` priority of the file handler, as defined by :c:type:`enum v4l2_priority ` h](j} )}(h``prio``h]h)}(hjs h]hprio}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjq ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjm ubj )}(hhh]h)}(hXpriority of the file handler, as defined by :c:type:`enum v4l2_priority `h](h,priority of the file handler, as defined by }(hj hhhNhNubh)}(h,:c:type:`enum v4l2_priority `h]h)}(hj h]henum v4l2_priority}(hj hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j* v4l2_priorityuh1hhj hKhj ubeh}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hjm ubeh}(h]h ]h"]h$]h&]uh1jv hj hKhjs ubjw )}(h``wait`` event' s wait queue h](j} )}(h``wait``h]h)}(hj h]hwait}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK!hj ubj )}(hhh]h)}(hevent' s wait queueh]hevent’ s wait queue}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK!hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jv hj hK!hjs ubjw )}(h``subscribe_lock`` serialise changes to the subscribed list; guarantee that the add and del event callbacks are orderly called h](j} )}(h``subscribe_lock``h]h)}(hj h]hsubscribe_lock}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK#hj ubj )}(hhh]h)}(hkserialise changes to the subscribed list; guarantee that the add and del event callbacks are orderly calledh]hkserialise changes to the subscribed list; guarantee that the add and del event callbacks are orderly called}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK"hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jv hj hK#hjs ubjw )}(h)``subscribed`` list of subscribed events h](j} )}(h``subscribed``h]h)}(hj> h]h subscribed}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj< ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK$hj8 ubj )}(hhh]h)}(hlist of subscribed eventsh]hlist of subscribed events}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjS hK$hjT ubah}(h]h ]h"]h$]h&]uh1j hj8 ubeh}(h]h ]h"]h$]h&]uh1jv hjS hK$hjs ubjw )}(h4``available`` list of events waiting to be dequeued h](j} )}(h ``available``h]h)}(hjw h]h available}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhju ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK%hjq ubj )}(hhh]h)}(h%list of events waiting to be dequeuedh]h%list of events waiting to be dequeued}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK%hj ubah}(h]h ]h"]h$]h&]uh1j hjq ubeh}(h]h ]h"]h$]h&]uh1jv hj hK%hjs ubjw )}(h@``navailable`` number of available events at **available** list h](j} )}(h``navailable``h]h)}(hj h]h navailable}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK&hj ubj )}(hhh]h)}(h0number of available events at **available** listh](hnumber of available events at }(hj hhhNhNubj)}(h **available**h]h available}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh list}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hK&hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jv hj hK&hjs ubjw )}(h#``sequence`` event sequence number h](j} )}(h ``sequence``h]h)}(hj h]hsequence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK'hj ubj )}(hhh]h)}(hevent sequence numberh]hevent sequence number}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK'hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jv hj hK'hjs ubjw )}(hC``m2m_ctx`` pointer to :c:type:`struct v4l2_m2m_ctx `h](j} )}(h ``m2m_ctx``h]h)}(hj4 h]hm2m_ctx}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2 ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK(hj. ubj )}(hhh]h)}(h7pointer to :c:type:`struct v4l2_m2m_ctx `h](h pointer to }(hjM hhhNhNubh)}(h,:c:type:`struct v4l2_m2m_ctx `h]h)}(hjW h]hstruct v4l2_m2m_ctx}(hjY hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjU ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j* v4l2_m2m_ctxuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK)hjM ubeh}(h]h ]h"]h$]h&]uh1hhjt hK)hjJ ubah}(h]h ]h"]h$]h&]uh1j hj. ubeh}(h]h ]h"]h$]h&]uh1jv hjI hK(hjs ubeh}(h]h ]h"]h$]h&]uh1jq hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjlhhhNhNubj~)}(hhh]h}(h]h ]h"]h$]h&]entries](jfile_to_v4l2_fh (C function)c.file_to_v4l2_fhhNtauh1j}hjlhhhNhNubj)}(hhh](j)}(h4struct v4l2_fh * file_to_v4l2_fh (struct file *filp)h]j)}(h2struct v4l2_fh *file_to_v4l2_fh(struct file *filp)h](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK` **Description** This function should be used by drivers to retrieve the :c:type:`struct v4l2_fh ` instance pointer stored in the file private_data instead of accessing the private_data field directly.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK@hj ubjr )}(hhh]jw )}(h>``struct file *filp`` pointer to :c:type:`struct file ` h](j} )}(h``struct file *filp``h]h)}(hj h]hstruct file *filp}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK>hj ubj )}(hhh]h)}(h'pointer to :c:type:`struct file `h](h pointer to }(hj hhhNhNubh)}(h:c:type:`struct file `h]h)}(hjh]h struct file}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*fileuh1hhj hK>hj ubeh}(h]h ]h"]h$]h&]uh1hhj hK>hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jv hj hK>hj ubah}(h]h ]h"]h$]h&]uh1jq hj ubh)}(h**Description**h]j)}(hjNh]h Description}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK@hj ubh)}(hThis function should be used by drivers to retrieve the :c:type:`struct v4l2_fh ` instance pointer stored in the file private_data instead of accessing the private_data field directly.h](h8This function should be used by drivers to retrieve the }(hjdhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]h)}(hjnh]hstruct v4l2_fh}(hjphhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjlubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_fhuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK?hjdubhg instance pointer stored in the file private_data instead of accessing the private_data field directly.}(hjdhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK?hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjlhhhNhNubj~)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_init (C function)c.v4l2_fh_inithNtauh1j}hjlhhhNhNubj)}(hhh](j)}(hAvoid v4l2_fh_init (struct v4l2_fh *fh, struct video_device *vdev)h]j)}(h@void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)h](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKJubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKJubj)}(h v4l2_fh_inith]j)}(h v4l2_fh_inith]h v4l2_fh_init}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKJubj' )}(h/(struct v4l2_fh *fh, struct video_device *vdev)h](j- )}(hstruct v4l2_fh *fhh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hv4l2_fhh]hv4l2_fh}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j )}j jsbc.v4l2_fh_initasbuh1hhjubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hj h]h*}(hjBhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(hfhh]hfh}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hjubj- )}(hstruct video_device *vdevh](j)}(hjh]hstruct}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubh)}(hhh]j)}(h video_deviceh]h video_device}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j0c.v4l2_fh_initasbuh1hhjdubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubj)}(hvdevh]hvdev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hjubeh}(h]h ]h"]h$]h&]hhuh1j& hjhhhjhKJubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKJubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKJhjhhubj)}(hhh]h)}(hInitialise the file handle.h]hInitialise the file handle.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKJhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKJubeh}(h]h ](jfunctioneh"]h$]h&]j jj jj jj j j uh1jhhhjlhNhNubj )}(hX**Parameters** ``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` ``struct video_device *vdev`` pointer to :c:type:`struct video_device ` **Description** Parts of the V4L2 framework using the file handles should be initialised in this function. Must be called from driver's v4l2_file_operations->open\(\) handler if the driver uses :c:type:`struct v4l2_fh `.h](h)}(h**Parameters**h]j)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKNhjubjr )}(hhh](jw )}(hE``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` h](j} )}(h``struct v4l2_fh *fh``h]h)}(hj*h]hstruct v4l2_fh *fh}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKLhj$ubj )}(hhh]h)}(h-pointer to :c:type:`struct v4l2_fh `h](h pointer to }(hjChhhNhNubh)}(h":c:type:`struct v4l2_fh `h]h)}(hjMh]hstruct v4l2_fh}(hjOhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjKubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_fhuh1hhj?hKLhjCubeh}(h]h ]h"]h$]h&]uh1hhj?hKLhj@ubah}(h]h ]h"]h$]h&]uh1j hj$ubeh}(h]h ]h"]h$]h&]uh1jv hj?hKLhj!ubjw )}(hV``struct video_device *vdev`` pointer to :c:type:`struct video_device ` h](j} )}(h``struct video_device *vdev``h]h)}(hjh]hstruct video_device *vdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKMhj|ubj )}(hhh]h)}(h7pointer to :c:type:`struct video_device `h](h pointer to }(hjhhhNhNubh)}(h,:c:type:`struct video_device `h]h)}(hjh]hstruct video_device}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j* video_deviceuh1hhjhKMhjubeh}(h]h ]h"]h$]h&]uh1hhjhKMhjubah}(h]h ]h"]h$]h&]uh1j hj|ubeh}(h]h ]h"]h$]h&]uh1jv hjhKMhj!ubeh}(h]h ]h"]h$]h&]uh1jq hjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKOhjubh)}(hParts of the V4L2 framework using the file handles should be initialised in this function. Must be called from driver's v4l2_file_operations->open\(\) handler if the driver uses :c:type:`struct v4l2_fh `.h](hParts of the V4L2 framework using the file handles should be initialised in this function. Must be called from driver’s v4l2_file_operations->open() handler if the driver uses }(hjhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]h)}(hjh]hstruct v4l2_fh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_fhuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKNhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKNhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjlhhhNhNubj~)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_add (C function) c.v4l2_fh_addhNtauh1j}hjlhhhNhNubj)}(hhh](j)}(h8void v4l2_fh_add (struct v4l2_fh *fh, struct file *filp)h]j)}(h7void v4l2_fh_add(struct v4l2_fh *fh, struct file *filp)h](j)}(hvoidh]hvoid}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@hhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKWubj)}(h h]h }(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@hhhjRhKWubj)}(h v4l2_fh_addh]j)}(h v4l2_fh_addh]h v4l2_fh_add}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubah}(h]h ](jjeh"]h$]h&]hhuh1jhj@hhhjRhKWubj' )}(h'(struct v4l2_fh *fh, struct file *filp)h](j- )}(hstruct v4l2_fh *fhh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubh)}(hhh]j)}(hv4l2_fhh]hv4l2_fh}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j )}j jgsb c.v4l2_fh_addasbuh1hhj}ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}ubj)}(hfhh]hfh}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hjyubj- )}(hstruct file *filph](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j c.v4l2_fh_addasbuh1hhjubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hj h]h*}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(hfilph]hfilp}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hjyubeh}(h]h ]h"]h$]h&]hhuh1j& hj@hhhjRhKWubeh}(h]h ]h"]h$]h&]hhjuh1jjjhj<hhhjRhKWubah}(h]j7ah ](jjeh"]h$]h&]jj)jhuh1jhjRhKWhj9hhubj)}(hhh]h)}(h9Add the fh to the list of file handles on a video_device.h]h9Add the fh to the list of file handles on a video_device.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKWhjqhhubah}(h]h ]h"]h$]h&]uh1jhj9hhhjRhKWubeh}(h]h ](jfunctioneh"]h$]h&]j jj jj jj j j uh1jhhhjlhNhNubj )}(hX9**Parameters** ``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` ``struct file *filp`` pointer to :c:type:`struct file ` associated with **fh** **Description** The function sets filp->private_data to point to **fh**. .. note:: The **fh** file handle must be initialised first.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK[hjubjr )}(hhh](jw )}(hE``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` h](j} )}(h``struct v4l2_fh *fh``h]h)}(hjh]hstruct v4l2_fh *fh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKYhjubj )}(hhh]h)}(h-pointer to :c:type:`struct v4l2_fh `h](h pointer to }(hjhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]h)}(hjh]hstruct v4l2_fh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_fhuh1hhjhKYhjubeh}(h]h ]h"]h$]h&]uh1hhjhKYhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jv hjhKYhjubjw )}(hU``struct file *filp`` pointer to :c:type:`struct file ` associated with **fh** h](j} )}(h``struct file *filp``h]h)}(hj h]hstruct file *filp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKZhjubj )}(hhh]h)}(h>pointer to :c:type:`struct file ` associated with **fh**h](h pointer to }(hj&hhhNhNubh)}(h:c:type:`struct file `h]h)}(hj0h]h struct file}(hj2hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj.ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*fileuh1hhj"hKZhj&ubh associated with }(hj&hhhNhNubj)}(h**fh**h]hfh}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1hhj"hKZhj#ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jv hj"hKZhjubeh}(h]h ]h"]h$]h&]uh1jq hjubh)}(h**Description**h]j)}(hjyh]h Description}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK\hjubh)}(h8The function sets filp->private_data to point to **fh**.h](h1The function sets filp->private_data to point to }(hjhhhNhNubj)}(h**fh**h]hfh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK[hjubhnote)}(h1The **fh** file handle must be initialised first.h]h)}(hjh](hThe }(hjhhhNhNubj)}(h**fh**h]hfh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh' file handle must be initialised first.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhK^hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjlhhhNhNubj~)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_open (C function)c.v4l2_fh_openhNtauh1j}hjlhhhNhNubj)}(hhh](j)}(h$int v4l2_fh_open (struct file *filp)h]j)}(h#int v4l2_fh_open(struct file *filp)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKdubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj hKdubj)}(h v4l2_fh_openh]j)}(h v4l2_fh_openh]h v4l2_fh_open}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhj hKdubj' )}(h(struct file *filp)h]j- )}(hstruct file *filph](j)}(hjh]hstruct}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubh)}(hhh]j)}(hfileh]hfile}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjYmodnameN classnameNj j )}j ]j )}j jsbc.v4l2_fh_openasbuh1hhj5ubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj5ubj)}(hfilph]hfilp}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hj1ubah}(h]h ]h"]h$]h&]hhuh1j& hjhhhj hKdubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhj hKdubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhj hKdhjhhubj)}(hhh]h)}(hNAncillary routine that can be used as the open\(\) op of v4l2_file_operations.h]hNAncillary routine that can be used as the open() op of v4l2_file_operations.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKdhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj hKdubeh}(h]h ](jfunctioneh"]h$]h&]j jj jj jj j j uh1jhhhjlhNhNubj )}(hXE**Parameters** ``struct file *filp`` pointer to struct file **Description** It allocates a v4l2_fh and inits and adds it to the :c:type:`struct video_device ` associated with the file pointer. On error filp->private_data will be ``NULL``, otherwise it will point to the :c:type:`struct v4l2_fh `.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhhjubjr )}(hhh]jw )}(h-``struct file *filp`` pointer to struct file h](j} )}(h``struct file *filp``h]h)}(hjh]hstruct file *filp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKghjubj )}(hhh]h)}(hpointer to struct fileh]hpointer to struct file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKghjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jv hjhKghjubah}(h]h ]h"]h$]h&]uh1jq hjubh)}(h**Description**h]j)}(hj8h]h Description}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKihjubh)}(hIt allocates a v4l2_fh and inits and adds it to the :c:type:`struct video_device ` associated with the file pointer.h](h4It allocates a v4l2_fh and inits and adds it to the }(hjNhhhNhNubh)}(h,:c:type:`struct video_device `h]h)}(hjXh]hstruct video_device}(hjZhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjVubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j* video_deviceuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhhjNubh" associated with the file pointer.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjuhKhhjubh)}(hpOn error filp->private_data will be ``NULL``, otherwise it will point to the :c:type:`struct v4l2_fh `.h](h$On error filp->private_data will be }(hjhhhNhNubh)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh!, otherwise it will point to the }(hjhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]h)}(hjh]hstruct v4l2_fh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_fhuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKkhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKkhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjlhhhNhNubj~)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_del (C function) c.v4l2_fh_delhNtauh1j}hjlhhhNhNubj)}(hhh](j)}(h8void v4l2_fh_del (struct v4l2_fh *fh, struct file *filp)h]j)}(h7void v4l2_fh_del(struct v4l2_fh *fh, struct file *filp)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKrubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKrubj)}(h v4l2_fh_delh]j)}(h v4l2_fh_delh]h v4l2_fh_del}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKrubj' )}(h'(struct v4l2_fh *fh, struct file *filp)h](j- )}(hstruct v4l2_fh *fhh](j)}(hjh]hstruct}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hv4l2_fhh]hv4l2_fh}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjAmodnameN classnameNj j )}j ]j )}j jsb c.v4l2_fh_delasbuh1hhjubj)}(h h]h }(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hj h]h*}(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(hfhh]hfh}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hjubj- )}(hstruct file *filph](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j[ c.v4l2_fh_delasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(hfilph]hfilp}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hjubeh}(h]h ]h"]h$]h&]hhuh1j& hjhhhjhKrubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKrubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKrhjhhubj)}(hhh]h)}(h1Remove file handle from the list of file handles.h]h1Remove file handle from the list of file handles.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKrhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKrubeh}(h]h ](jfunctioneh"]h$]h&]j jj j,j j,j j j uh1jhhhjlhNhNubj )}(hXt**Parameters** ``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` ``struct file *filp`` pointer to :c:type:`struct file ` associated with **fh** **Description** The function resets filp->private_data to NULL. .. note:: Must be called in v4l2_file_operations->release\(\) handler if the driver uses :c:type:`struct v4l2_fh `.h](h)}(h**Parameters**h]j)}(hj6h]h Parameters}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKvhj0ubjr )}(hhh](jw )}(hE``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` h](j} )}(h``struct v4l2_fh *fh``h]h)}(hjUh]hstruct v4l2_fh *fh}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjSubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKthjOubj )}(hhh]h)}(h-pointer to :c:type:`struct v4l2_fh `h](h pointer to }(hjnhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]h)}(hjxh]hstruct v4l2_fh}(hjzhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjvubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_fhuh1hhjjhKthjnubeh}(h]h ]h"]h$]h&]uh1hhjjhKthjkubah}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ]h"]h$]h&]uh1jv hjjhKthjLubjw )}(hU``struct file *filp`` pointer to :c:type:`struct file ` associated with **fh** h](j} )}(h``struct file *filp``h]h)}(hjh]hstruct file *filp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKuhjubj )}(hhh]h)}(h>pointer to :c:type:`struct file ` associated with **fh**h](h pointer to }(hjhhhNhNubh)}(h:c:type:`struct file `h]h)}(hjh]h struct file}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*fileuh1hhjhKuhjubh associated with }(hjhhhNhNubj)}(h**fh**h]hfh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhjhKuhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jv hjhKuhjLubeh}(h]h ]h"]h$]h&]uh1jq hj0ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKwhj0ubh)}(h/The function resets filp->private_data to NULL.h]h/The function resets filp->private_data to NULL.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKvhj0ubj)}(hrMust be called in v4l2_file_operations->release\(\) handler if the driver uses :c:type:`struct v4l2_fh `.h]h)}(hrMust be called in v4l2_file_operations->release\(\) handler if the driver uses :c:type:`struct v4l2_fh `.h](hOMust be called in v4l2_file_operations->release() handler if the driver uses }(hjBhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]h)}(hjLh]hstruct v4l2_fh}(hjNhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjJubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_fhuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKyhjBubh.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjihKyhj>ubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjlhhhNhNubj~)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_exit (C function)c.v4l2_fh_exithNtauh1j}hjlhhhNhNubj)}(hhh](j)}(h&void v4l2_fh_exit (struct v4l2_fh *fh)h]j)}(h%void v4l2_fh_exit(struct v4l2_fh *fh)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(h v4l2_fh_exith]j)}(h v4l2_fh_exith]h v4l2_fh_exit}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubj' )}(h(struct v4l2_fh *fh)h]j- )}(hstruct v4l2_fh *fhh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hv4l2_fhh]hv4l2_fh}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j )}j jsbc.v4l2_fh_exitasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hj h]h*}(hj#hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(hfhh]hfh}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hjubah}(h]h ]h"]h$]h&]hhuh1j& hjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKhjhhubj)}(hhh]h)}(h+Release resources related to a file handle.h]h+Release resources related to a file handle.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjWhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j jj jrj jrj j j uh1jhhhjlhNhNubj )}(hXB**Parameters** ``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` **Description** Parts of the V4L2 framework using the v4l2_fh must release their resources here, too. .. note:: Must be called in v4l2_file_operations->release\(\) handler if the driver uses :c:type:`struct v4l2_fh `.h](h)}(h**Parameters**h]j)}(hj|h]h Parameters}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjvubjr )}(hhh]jw )}(hE``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` h](j} )}(h``struct v4l2_fh *fh``h]h)}(hjh]hstruct v4l2_fh *fh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubj )}(hhh]h)}(h-pointer to :c:type:`struct v4l2_fh `h](h pointer to }(hjhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]h)}(hjh]hstruct v4l2_fh}(hjhhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_fhuh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jv hjhKhjubah}(h]h ]h"]h$]h&]uh1jq hjvubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjvubh)}(hUParts of the V4L2 framework using the v4l2_fh must release their resources here, too.h]hUParts of the V4L2 framework using the v4l2_fh must release their resources here, too.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjvubj)}(hrMust be called in v4l2_file_operations->release\(\) handler if the driver uses :c:type:`struct v4l2_fh `.h]h)}(hrMust be called in v4l2_file_operations->release\(\) handler if the driver uses :c:type:`struct v4l2_fh `.h](hOMust be called in v4l2_file_operations->release() handler if the driver uses }(hjhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]h)}(hj(h]hstruct v4l2_fh}(hj*hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_fhuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjEhKhjubah}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjlhhhNhNubj~)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_release (C function)c.v4l2_fh_releasehNtauh1j}hjlhhhNhNubj)}(hhh](j)}(h'int v4l2_fh_release (struct file *filp)h]j)}(h&int v4l2_fh_release(struct file *filp)h](j)}(hinth]hint}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrhhhjhKubj)}(hv4l2_fh_releaseh]j)}(hv4l2_fh_releaseh]hv4l2_fh_release}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjrhhhjhKubj' )}(h(struct file *filp)h]j- )}(hstruct file *filph](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNj j )}j ]j )}j jsbc.v4l2_fh_releaseasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(hfilph]hfilp}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hjubah}(h]h ]h"]h$]h&]hhuh1j& hjrhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjnhhhjhKubah}(h]jiah ](jjeh"]h$]h&]jj)jhuh1jhjhKhjkhhubj)}(hhh]h)}(hQAncillary routine that can be used as the release\(\) op of v4l2_file_operations.h]hQAncillary routine that can be used as the release() op of v4l2_file_operations.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhj3hhubah}(h]h ]h"]h$]h&]uh1jhjkhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j jj jNj jNj j j uh1jhhhjlhNhNubj )}(hX**Parameters** ``struct file *filp`` pointer to struct file **Description** It deletes and exits the v4l2_fh associated with the file pointer and frees it. It will do nothing if filp->private_data (the pointer to the v4l2_fh struct) is ``NULL``. This function always returns 0.h](h)}(h**Parameters**h]j)}(hjXh]h Parameters}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjRubjr )}(hhh]jw )}(h-``struct file *filp`` pointer to struct file h](j} )}(h``struct file *filp``h]h)}(hjwh]hstruct file *filp}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjqubj )}(hhh]h)}(hpointer to struct fileh]hpointer to struct file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjqubeh}(h]h ]h"]h$]h&]uh1jv hjhKhjnubah}(h]h ]h"]h$]h&]uh1jq hjRubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjRubh)}(hIt deletes and exits the v4l2_fh associated with the file pointer and frees it. It will do nothing if filp->private_data (the pointer to the v4l2_fh struct) is ``NULL``.h](hIt deletes and exits the v4l2_fh associated with the file pointer and frees it. It will do nothing if filp->private_data (the pointer to the v4l2_fh struct) is }(hjhhhNhNubh)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjRubh)}(hThis function always returns 0.h]hThis function always returns 0.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjRubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjlhhhNhNubj~)}(hhh]h}(h]h ]h"]h$]h&]entries](j v4l2_fh_is_singular (C function)c.v4l2_fh_is_singularhNtauh1j}hjlhhhNhNubj)}(hhh](j)}(h,int v4l2_fh_is_singular (struct v4l2_fh *fh)h]j)}(h+int v4l2_fh_is_singular(struct v4l2_fh *fh)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj&hKubj)}(hv4l2_fh_is_singularh]j)}(hv4l2_fh_is_singularh]hv4l2_fh_is_singular}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhj&hKubj' )}(h(struct v4l2_fh *fh)h]j- )}(hstruct v4l2_fh *fhh](j)}(hjh]hstruct}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubh)}(hhh]j)}(hv4l2_fhh]hv4l2_fh}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjumodnameN classnameNj j )}j ]j )}j j;sbc.v4l2_fh_is_singularasbuh1hhjQubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubj)}(hfhh]hfh}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hjMubah}(h]h ]h"]h$]h&]hhuh1j& hjhhhj&hKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhj&hKubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jhj&hKhj hhubj)}(hhh]h)}(h[Returns 1 if this filehandle is the only filehandle opened for the associated video_device.h]h[Returns 1 if this filehandle is the only filehandle opened for the associated video_device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhj hhhj&hKubeh}(h]h ](jfunctioneh"]h$]h&]j jj jj jj j j uh1jhhhjlhNhNubj )}(h**Parameters** ``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` **Description** If **fh** is NULL, then it returns 0.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubjr )}(hhh]jw )}(hE``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` h](j} )}(h``struct v4l2_fh *fh``h]h)}(hjh]hstruct v4l2_fh *fh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubj )}(hhh]h)}(h-pointer to :c:type:`struct v4l2_fh `h](h pointer to }(hj2hhhNhNubh)}(h":c:type:`struct v4l2_fh `h]h)}(hj<h]hstruct v4l2_fh}(hj>hhhNhNubah}(h]h ](jjc-typeeh"]h$]h&]uh1hhj:ubah}(h]h ]h"]h$]h&]refdocj$ refdomainjreftypetype refexplicitrefwarnj j j*v4l2_fhuh1hhj.hKhj2ubeh}(h]h ]h"]h$]h&]uh1hhj.hKhj/ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jv hj.hKhjubah}(h]h ]h"]h$]h&]uh1jq hjubh)}(h**Description**h]j)}(hjsh]h Description}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubh)}(h%If **fh** is NULL, then it returns 0.h](hIf }(hjhhhNhNubj)}(h**fh**h]hfh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is NULL, then it returns 0.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjlhhhNhNubj~)}(hhh]h}(h]h ]h"]h$]h&]entries](j%v4l2_fh_is_singular_file (C function)c.v4l2_fh_is_singular_filehNtauh1j}hjlhhhNhNubj)}(hhh](j)}(h0int v4l2_fh_is_singular_file (struct file *filp)h]j)}(h/int v4l2_fh_is_singular_file(struct file *filp)h](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(hv4l2_fh_is_singular_fileh]j)}(hv4l2_fh_is_singular_fileh]hv4l2_fh_is_singular_file}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubj' )}(h(struct file *filp)h]j- )}(hstruct file *filph](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hfileh]hfile}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj'modnameN classnameNj j )}j ]j )}j jsbc.v4l2_fh_is_singular_fileasbuh1hhjubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj )}(hj h]h*}(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj)}(hfilph]hfilp}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j, hjubah}(h]h ]h"]h$]h&]hhuh1j& hjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jhjhKhjhhubj)}(hhh]h)}(h[Returns 1 if this filehandle is the only filehandle opened for the associated video_device.h]h[Returns 1 if this filehandle is the only filehandle opened for the associated video_device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j jj jj jj j j uh1jhhhjlhNhNubj )}(h**Parameters** ``struct file *filp`` pointer to struct file **Description** This is a helper function variant of v4l2_fh_is_singular() with uses struct file as argument. If filp->private_data is ``NULL``, then it will return 0.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubjr )}(hhh]jw )}(h-``struct file *filp`` pointer to struct file h](j} )}(h``struct file *filp``h]h)}(hjh]hstruct file *filp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1j| ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubj )}(hhh]h)}(hpointer to struct fileh]hpointer to struct file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jv hjhKhjubah}(h]h ]h"]h$]h&]uh1jq hjubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubh)}(h]This is a helper function variant of v4l2_fh_is_singular() with uses struct file as argument.h]h]This is a helper function variant of v4l2_fh_is_singular() with uses struct file as argument.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubh)}(h9If filp->private_data is ``NULL``, then it will return 0.h](hIf filp->private_data is }(hj+hhhNhNubh)}(h``NULL``h]hNULL}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+ubh, then it will return 0.}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:136: ./include/media/v4l2-fh.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjlhhhNhNubeh}(h]%v4l2-fh-functions-and-data-structuresah ]h"]%v4l2 fh functions and data structuresah$]h&]uh1hhhhhhhhKubeh}(h]v4l2-file-handlesah ]h"]v4l2 file handlesah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j`j]jXjUu nametypes}(j`jXuh}(j]hjUjljjj j jjj7j<jjjjjjjijnj jjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.