Wsphinx.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]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 handlersh]hV4L2 File handlers}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hjstruct v4l2_fh provides a way to easily keep file handle specific data that is used by the V4L2 framework.h]hjstruct v4l2_fh provides a way to easily keep file handle specific data that is used by the V4L2 framework.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh attention)}(htNew drivers must use struct v4l2_fh since it is also used to implement priority handling (:ref:`VIDIOC_G_PRIORITY`).h]h)}(htNew drivers must use struct v4l2_fh since it is also used to implement priority handling (:ref:`VIDIOC_G_PRIORITY`).h](hZNew drivers must use struct v4l2_fh since it is also used to implement priority handling (}(hhhhhNhNubh)}(h:ref:`VIDIOC_G_PRIORITY`h]hinline)}(hhh]hVIDIOC_G_PRIORITY}(hhhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]refdocdriver-api/media/v4l2-fh refdomainhreftyperef refexplicitrefwarn reftargetvidioc_g_priorityuh1hhhhK hhubh).}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubh)}(hX"The users of :c:type:`v4l2_fh` (in the V4L2 framework, not the driver) know whether a driver uses :c:type:`v4l2_fh` as its ``file->private_data`` pointer by testing the ``V4L2_FL_USES_V4L2_FH`` bit in :c:type:`video_device`->flags. This bit is set whenever :c:func:`v4l2_fh_init` is called.h](h The users of }(hjhhhNhNubh)}(h:c:type:`v4l2_fh`h]hliteral)}(hj&h]hv4l2_fh}(hj*hhhNhNubah}(h]h ](hcc-typeeh"]h$]h&]uh1j(hj$ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKhjubhD (in the V4L2 framework, not the driver) know whether a driver uses }(hjhhhNhNubh)}(h:c:type:`v4l2_fh`h]j))}(hjLh]hv4l2_fh}(hjNhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjJubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKhjubh as its }(hjhhhNhNubj))}(h``file->private_data``h]hfile->private_data}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubh pointer by testing the }(hjhhhNhNubj))}(h``V4L2_FL_USES_V4L2_FH``h]hV4L2_FL_USES_V4L2_FH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubh bit in }(hjhhhNhNubh)}(h:c:type:`video_device`h]j))}(hjh]h video_device}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj  video_deviceuh1hhhhKhjubh"->flags. This bit is set whenever }(hjhhhNhNubh)}(h:c:func:`v4l2_fh_init`h]j))}(hjh]hv4l2_fh_init()}(hjhhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj  v4l2_fh_inituh1hhhhKhjubh is called.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hstruct v4l2_fh is allocated as a part of the driver's own file handle structure and ``file->private_data`` is set to it in the driver's ``open()`` function by the driver.h](hVstruct v4l2_fh is allocated as a part of the driver’s own file handle structure and }(hjhhhNhNubj))}(h``file->private_data``h]hfile->private_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubh is set to it in the driver’s }(hjhhhNhNubj))}(h ``open()``h]hopen()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubh function by the driver.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hfIn many cases the struct v4l2_fh will be embedded in a larger structure. In that case you should call:h]hfIn many cases the struct v4l2_fh will be embedded in a larger structure. In that case you should call:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhenumerated_list)}(hhh](h list_item)}(h>:c:func:`v4l2_fh_init` and :c:func:`v4l2_fh_add` in ``open()``h]h)}(hj&h](h)}(h:c:func:`v4l2_fh_init`h]j))}(hj-h]hv4l2_fh_init()}(hj/hhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hj+ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj  v4l2_fh_inituh1hhhhKhj(ubh and }(hj(hhhNhNubh)}(h:c:func:`v4l2_fh_add`h]j))}(hjPh]h v4l2_fh_add()}(hjRhhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hjNubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj  v4l2_fh_adduh1hhhhKhj(ubh in }(hj(hhhNhNubj))}(h ``open()``h]hopen()}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj(ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj$ubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubj#)}(hB:c:func:`v4l2_fh_del` and :c:func:`v4l2_fh_exit` in ``release()`` h]h)}(hA:c:func:`v4l2_fh_del` and :c:func:`v4l2_fh_exit` in ``release()``h](h)}(h:c:func:`v4l2_fh_del`h]j))}(hjh]h v4l2_fh_del()}(hjhhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj  v4l2_fh_deluh1hhhhKhjubh and }(hjhhhNhNubh)}(h:c:func:`v4l2_fh_exit`h]j))}(hjh]hv4l2_fh_exit()}(hjhhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj  v4l2_fh_exituh1hhhhKhjubh in }(hjhhhNhNubj))}(h ``release()``h]h release()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix)uh1jhhhhhhhKubh)}(hTDrivers can extract their own file handle structure by using the container_of macro.h]hTDrivers can extract their own file handle structure by using the container_of macro.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hExample:h]hExample:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh 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); ... file->private_data = &my_fh->fh; v4l2_fh_add(&my_fh->fh); return 0; } int my_release(struct file *file) { struct v4l2_fh *fh = file->private_data; struct my_fh *my_fh = container_of(fh, struct my_fh, fh); ... v4l2_fh_del(&my_fh->fh); 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); ... file->private_data = &my_fh->fh; v4l2_fh_add(&my_fh->fh); return 0; } int my_release(struct file *file) { struct v4l2_fh *fh = file->private_data; struct my_fh *my_fh = container_of(fh, struct my_fh, fh); ... v4l2_fh_del(&my_fh->fh); v4l2_fh_exit(&my_fh->fh); kfree(my_fh); return 0; }}hjsbah}(h]h ]h"]h$]h&]hhforcelanguagej4highlight_args}uh1jhhhK"hhhhubh)}(hEBelow is a short description of the :c:type:`v4l2_fh` functions used:h](h$Below is a short description of the }(hj.hhhNhNubh)}(h:c:type:`v4l2_fh`h]j))}(hj8h]hv4l2_fh}(hj:hhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hj6ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKLhj.ubh functions used:}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKLhhhhubh)}(h]:c:func:`v4l2_fh_init ` (:c:type:`fh `, :c:type:`vdev `)h](h)}(h%:c:func:`v4l2_fh_init `h]j))}(hjeh]h v4l2_fh_init}(hjghhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hjcubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj  v4l2_fh_inituh1hhhhKNhj_ubh (}(hj_hhhNhNubh)}(h:c:type:`fh `h]j))}(hjh]hfh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKNhj_ubh, }(hj_hhhNhNubh)}(h:c:type:`vdev `h]j))}(hjh]hvdev}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj  video_deviceuh1hhhhKNhj_ubh)}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKNhhhhubh bullet_list)}(hhh]j#)}(hxInitialise 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]j))}(hjh]hv4l2_file_operations}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_file_operationsuh1hhhhKRhjubh->open() handler.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubah}(h]h ]h"]h$]h&]bullet-uh1jhhhKRhhhhubh)}(h<:c:func:`v4l2_fh_add ` (:c:type:`fh `)h](h)}(h#:c:func:`v4l2_fh_add `h]j))}(hj4h]h v4l2_fh_add}(hj6hhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hj2ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj  v4l2_fh_adduh1hhhhKVhj.ubh (}(hj.hhhNhNubh)}(h:c:type:`fh `h]j))}(hjWh]hfh}(hjYhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjUubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKVhj.ubh)}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKVhhhhubj)}(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 }(hjhhhNhNubh)}(h:c:type:`v4l2_fh`h]j))}(hjh]hv4l2_fh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKYhjubh to }(hjhhhNhNubh)}(h:c:type:`video_device`h]j))}(hjh]h video_device}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj  video_deviceuh1hhhhKYhjubhQ file handle list. Must be called once the file handle is completely initialized.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKYhjubah}(h]h ]h"]h$]h&]uh1j"hj~hhhhhNubah}(h]h ]h"]h$]h&]j,j-uh1jhhhKYhhhhubh)}(h<:c:func:`v4l2_fh_del ` (:c:type:`fh `)h](h)}(h#:c:func:`v4l2_fh_del `h]j))}(hjh]h v4l2_fh_del}(hjhhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj  v4l2_fh_deluh1hhhhK\hjubh (}(hjhhhNhNubh)}(h:c:type:`fh `h]j))}(hjh]hfh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhK\hjubh)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK\hhhhubj)}(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 }(hj<hhhNhNubh)}(h:c:type:`video_device`h]j))}(hjFh]h video_device}(hjHhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjDubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj  video_deviceuh1hhhhK_hj<ubh2. The file handle exit function may now be called.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK_hj8ubah}(h]h ]h"]h$]h&]uh1j"hj5hhhhhNubah}(h]h ]h"]h$]h&]j,j-uh1jhhhK_hhhhubh)}(h>:c:func:`v4l2_fh_exit ` (:c:type:`fh `)h](h)}(h%:c:func:`v4l2_fh_exit `h]j))}(hjh]h v4l2_fh_exit}(hjhhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hj}ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj  v4l2_fh_exituh1hhhhKbhjyubh (}(hjyhhhNhNubh)}(h:c:type:`fh `h]j))}(hjh]hfh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKbhjyubh)}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKbhhhhubj)}(hhh]j#)}(haUninitialise 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]j))}(hjh]hv4l2_fh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKehjubh memory can be freed.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKehjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubah}(h]h ]h"]h$]h&]j,j-uh1jhhhKehhhhubh)}(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&]uh1hhhhKihhhhubh)}(h::c:func:`v4l2_fh_open ` (struct file \*filp)h](h)}(h%:c:func:`v4l2_fh_open `h]j))}(hj!h]h v4l2_fh_open}(hj#hhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj  v4l2_fh_openuh1hhhhKkhjubh (struct file *filp)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKkhhhhubj)}(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.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjKubah}(h]h ]h"]h$]h&]uh1j"hjHhhhhhNubah}(h]h ]h"]h$]h&]j,j-uh1jhhhKnhhhhubh)}(h@:c:func:`v4l2_fh_release ` (struct file \*filp)h](h)}(h+:c:func:`v4l2_fh_release `h]j))}(hjoh]hv4l2_fh_release}(hjqhhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hjmubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj v4l2_fh_releaseuh1hhhhKqhjiubh (struct file *filp)}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKqhhhhubj)}(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 }(hjhhhNhNubh)}(h:c:type:`v4l2_fh`h]j))}(hjh]hv4l2_fh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKthjubh and frees it.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKthjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubah}(h]h ]h"]h$]h&]j,j-uh1jhhhKthhhhubh)}(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 }(hjhhhNhNubj))}(h ``open()``h]hopen()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubh and }(hjhhhNhNubj))}(h ``release()``h]h release()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubh ops.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKwhhhhubh)}(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]j))}(hjh]hv4l2_fh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKzhj ubhB struct is the only open filehandle of the associated device node:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKzhhhhubh)}(hL:c:func:`v4l2_fh_is_singular ` (:c:type:`fh `)h](h)}(h3:c:func:`v4l2_fh_is_singular `h]j))}(hjCh]hv4l2_fh_is_singular}(hjEhhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hjAubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc refexplicitrefwarnj v4l2_fh_is_singularuh1hhhhKhj=ubh (}(hj=hhhNhNubh)}(h:c:type:`fh `h]j))}(hjfh]hfh}(hjhhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjdubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj v4l2_fhuh1hhhhKhj=ubh)}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj)}(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&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubah}(h]h ]h"]h$]h&]j,j-uh1jhhhKhhhhubh)}(hR:c:func:`v4l2_fh_is_singular_file ` (struct file \*filp)h](h)}(h=:c:func:`v4l2_fh_is_singular_file `h]j))}(hjh]hv4l2_fh_is_singular_file}(hjhhhNhNubah}(h]h ](hj4c-funceh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypefunc 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j"hjhhhhhNubah}(h]h ]h"]h$]h&]j,j-uh1jhhhKhhhhubh)}(hhh](h)}(h%V4L2 fh functions and data structuresh]h%V4L2 fh functions and data structures}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlev4l2_fh (C struct) c.v4l2_fhhNtauh1j hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hv4l2_fhh]hdesc_signature_line)}(hstruct v4l2_fhh](hdesc_sig_keyword)}(hstructh]hstruct}(hj1hhhNhNubah}(h]h ]kah"]h$]h&]uh1j/hj+hhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKubhdesc_sig_space)}(h h]h }(hjChhhNhNubah}(h]h ]wah"]h$]h&]uh1jAhj+hhhj@hKubh desc_name)}(hv4l2_fhh]h desc_sig_name)}(hj'h]hv4l2_fh}(hjZhhhNhNubah}(h]h ]nah"]h$]h&]uh1jXhjTubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jRhj+hhhj@hKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1j)sphinx_line_type declaratorhj%hhhj@hKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j#hj@hKhj hhubh 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:141: ./include/media/v4l2-fh.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhj hhhj@hKubeh}(h]h ](j4structeh"]h$]h&]domainj4objtypejdesctypejnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh 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)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(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:141: ./include/media/v4l2-fh.hhKhjubj)}(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; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhjubh)}(h **Members**h]j)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK-hjubhdefinition_list)}(hhh](hdefinition_list_item)}(h``list`` list of file handlers h](hterm)}(h``list``h]j))}(hj h]hlist}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhjubh 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 hjubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(hA``vdev`` pointer to :c:type:`struct video_device ` h](j )}(h``vdev``h]j))}(hj? h]hvdev}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj= ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhj9 ubj )}(hhh]h)}(h7pointer to :c:type:`struct video_device `h](h pointer to }(hjX hhhNhNubh)}(h,:c:type:`struct video_device `h]j))}(hjb h]hstruct video_device}(hjd hhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hj` ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sbj  video_deviceuh1hhjT hKhjX ubeh}(h]h ]h"]h$]h&]uh1hhjT hKhjU ubah}(h]h ]h"]h$]h&]uh1j hj9 ubeh}(h]h ]h"]h$]h&]uh1jhjT hKhjubj)}(hS``ctrl_handler`` pointer to :c:type:`struct v4l2_ctrl_handler ` h](j )}(h``ctrl_handler``h]j))}(hj h]h ctrl_handler}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhj ubj )}(hhh]h)}(hApointer to :c:type:`struct v4l2_ctrl_handler `h](h pointer to }(hj hhhNhNubh)}(h6:c:type:`struct v4l2_ctrl_handler `h]j))}(hj h]hstruct v4l2_ctrl_handler}(hj hhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j v4l2_ctrl_handleruh1hhj hKhj ubeh}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(hb``prio`` priority of the file handler, as defined by :c:type:`enum v4l2_priority ` h](j )}(h``prio``h]j))}(hj h]hprio}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhj 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]j))}(hj h]henum v4l2_priority}(hj hhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j  v4l2_priorityuh1hhj hKhj ubeh}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhjubj)}(h``wait`` event' s wait queue h](j )}(h``wait``h]j))}(hjO h]hwait}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjM ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK!hjI ubj )}(hhh]h)}(hevent' s wait queueh]hevent’ s wait queue}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjd hK!hje ubah}(h]h ]h"]h$]h&]uh1j hjI ubeh}(h]h ]h"]h$]h&]uh1jhjd hK!hjubj)}(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]j))}(hj h]hsubscribe_lock}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./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:141: ./include/media/v4l2-fh.hhK"hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jhj hK#hjubj)}(h)``subscribed`` list of subscribed events h](j )}(h``subscribed``h]j))}(hj h]h subscribed}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK$hj ubj )}(hhh]h)}(hlist of subscribed eventsh]hlist of subscribed events}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK$hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jhj hK$hjubj)}(h4``available`` list of events waiting to be dequeued h](j )}(h ``available``h]j))}(hj h]h available}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK%hj 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 hj ubeh}(h]h ]h"]h$]h&]uh1jhj hK%hjubj)}(h@``navailable`` number of available events at **available** list h](j )}(h``navailable``h]j))}(hj4 h]h navailable}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj2 ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK&hj. ubj )}(hhh]h)}(h0number of available events at **available** listh](hnumber of available events at }(hjM hhhNhNubj)}(h **available**h]h available}(hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjM ubh list}(hjM hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjI hK&hjJ ubah}(h]h ]h"]h$]h&]uh1j hj. ubeh}(h]h ]h"]h$]h&]uh1jhjI hK&hjubj)}(h#``sequence`` event sequence number h](j )}(h ``sequence``h]j))}(hj h]hsequence}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj} ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK'hjy 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 hjy ubeh}(h]h ]h"]h$]h&]uh1jhj hK'hjubj)}(hC``m2m_ctx`` pointer to :c:type:`struct v4l2_m2m_ctx `h](j )}(h ``m2m_ctx``h]j))}(hj h]hm2m_ctx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK(hj ubj )}(hhh]h)}(h7pointer to :c:type:`struct v4l2_m2m_ctx `h](h pointer to }(hj hhhNhNubh)}(h,:c:type:`struct v4l2_m2m_ctx `h]j))}(hj h]hstruct v4l2_m2m_ctx}(hj hhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j  v4l2_m2m_ctxuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK)hj ubeh}(h]h ]h"]h$]h&]uh1hhj hK)hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jhj hK(hjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_init (C function)c.v4l2_fh_inithNtauh1j hjhhhNhNubj)}(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}(hj3 hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j1 hj- hhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKFubjB)}(h h]h }(hjC hhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhj- hhhjB hKFubjS)}(h v4l2_fh_inith]jY)}(h v4l2_fh_inith]h v4l2_fh_init}(hjU hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjQ ubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhj- hhhjB hKFubhdesc_parameterlist)}(h/(struct v4l2_fh *fh, struct video_device *vdev)h](hdesc_parameter)}(hstruct v4l2_fh *fhh](j0)}(hj3h]hstruct}(hju hhhNhNubah}(h]h ]j<ah"]h$]h&]uh1j/hjq ubjB)}(h h]h }(hj hhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjq ubh)}(hhh]jY)}(hv4l2_fhh]hv4l2_fh}(hj hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhj ubah}(h]h ]h"]h$]h&] refdomainj4reftype identifier reftargetj modnameN classnameNj~ j )}j ]j ASTIdentifier)}j jW sbc.v4l2_fh_initasbuh1hhjq ubjB)}(h h]h }(hj hhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjq ubhdesc_sig_punctuation)}(h*h]h*}(hj hhhNhNubah}(h]h ]pah"]h$]h&]uh1j hjq ubjY)}(hfhh]hfh}(hj hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjq ubeh}(h]h ]h"]h$]h&]noemphhhuh1jo hjk ubjp )}(hstruct video_device *vdevh](j0)}(hj3h]hstruct}(hj hhhNhNubah}(h]h ]j<ah"]h$]h&]uh1j/hj ubjB)}(h h]h }(hj hhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhj ubh)}(hhh]jY)}(h video_deviceh]h video_device}(hj hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhj ubah}(h]h ]h"]h$]h&] refdomainj4reftypej reftargetj modnameN classnameNj~ j )}j ]j c.v4l2_fh_initasbuh1hhj ubjB)}(h h]h }(hj* hhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhj ubj )}(hj h]h*}(hj8 hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubjY)}(hvdevh]hvdev}(hjE hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jo hjk ubeh}(h]h ]h"]h$]h&]hhuh1ji hj- hhhjB hKFubeh}(h]h ]h"]h$]h&]hhjvuh1j)jwjxhj) hhhjB hKFubah}(h]j$ ah ](j|j}eh"]h$]h&]jj)jhuh1j#hjB hKFhj& hhubj)}(hhh]h)}(hInitialise the file handle.h]hInitialise the file handle.}(hjo hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK` ``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:141: ./include/media/v4l2-fh.hhK@hj ubj)}(hhh](j)}(hE``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` h](j )}(h``struct v4l2_fh *fh``h]j))}(hj h]hstruct v4l2_fh *fh}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK>hj ubj )}(hhh]h)}(h-pointer to :c:type:`struct v4l2_fh `h](h pointer to }(hj hhhNhNubh)}(h":c:type:`struct v4l2_fh `h]j))}(hj h]hstruct v4l2_fh}(hj hhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j v4l2_fhuh1hhj 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&]uh1jhj hK>hj ubj)}(hV``struct video_device *vdev`` pointer to :c:type:`struct video_device ` h](j )}(h``struct video_device *vdev``h]j))}(hjh]hstruct video_device *vdev}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK?hjubj )}(hhh]h)}(h7pointer to :c:type:`struct video_device `h](h pointer to }(hj!hhhNhNubh)}(h,:c:type:`struct video_device `h]j))}(hj+h]hstruct video_device}(hj-hhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hj)ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j  video_deviceuh1hhjhK?hj!ubeh}(h]h ]h"]h$]h&]uh1hhjhK?hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjhK?hj ubeh}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]j)}(hjbh]h Description}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKAhj ubh)}(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 }(hjxhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]j))}(hjh]hstruct v4l2_fh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j v4l2_fhuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKAhjxubh.}(hjxhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKAhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_add (C function) c.v4l2_fh_addhNtauh1j hjhhhNhNubj)}(hhh](j$)}(h%void v4l2_fh_add (struct v4l2_fh *fh)h]j*)}(h$void v4l2_fh_add(struct v4l2_fh *fh)h](j2 )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j> ah"]h$]h&]uh1j1 hjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKPubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjhhhjhKPubjS)}(h v4l2_fh_addh]jY)}(h v4l2_fh_addh]h v4l2_fh_add}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjhhhjhKPubjj )}(h(struct v4l2_fh *fh)h]jp )}(hstruct v4l2_fh *fhh](j0)}(hj3h]hstruct}(hjhhhNhNubah}(h]h ]j<ah"]h$]h&]uh1j/hjubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjubh)}(hhh]jY)}(hv4l2_fhh]hv4l2_fh}(hj%hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhj"ubah}(h]h ]h"]h$]h&] refdomainj4reftypej reftargetj'modnameN classnameNj~ j )}j ]j )}j jsb c.v4l2_fh_addasbuh1hhjubjB)}(h h]h }(hjEhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjubj )}(hj h]h*}(hjShhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjY)}(hfhh]hfh}(hj`hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jo hjubah}(h]h ]h"]h$]h&]hhuh1ji hjhhhjhKPubeh}(h]h ]h"]h$]h&]hhjvuh1j)jwjxhjhhhjhKPubah}(h]jah ](j|j}eh"]h$]h&]jj)jhuh1j#hjhKPhjhhubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKIhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKPubeh}(h]h ](j4functioneh"]h$]h&]jj4jjjjjjjuh1jhhhjhNhNubj)}(h**Parameters** ``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` **Description** .. 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:141: ./include/media/v4l2-fh.hhKMhjubj)}(hhh]j)}(hE``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` h](j )}(h``struct v4l2_fh *fh``h]j))}(hjh]hstruct v4l2_fh *fh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKKhjubj )}(hhh]h)}(h-pointer to :c:type:`struct v4l2_fh `h](h pointer to }(hjhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]j))}(hjh]hstruct v4l2_fh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j v4l2_fhuh1hhjhKKhjubeh}(h]h ]h"]h$]h&]uh1hhjhKKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjhKKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hj%h]h Description}(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:141: ./include/media/v4l2-fh.hhKMhjubhnote)}(h1The **fh** file handle must be initialised first.h]h)}(hj?h](hThe }(hjAhhhNhNubj)}(h**fh**h]hfh}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh' file handle must be initialised first.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKNhj=ubah}(h]h ]h"]h$]h&]uh1j;hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_open (C function)c.v4l2_fh_openhNtauh1j hjhhhNhNubj)}(hhh](j$)}(h$int v4l2_fh_open (struct file *filp)h]j*)}(h#int v4l2_fh_open(struct file *filp)h](j2 )}(hinth]hint}(hjhhhNhNubah}(h]h ]j> ah"]h$]h&]uh1j1 hjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK[ubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjhhhjhK[ubjS)}(h v4l2_fh_openh]jY)}(h v4l2_fh_openh]h v4l2_fh_open}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjhhhjhK[ubjj )}(h(struct file *filp)h]jp )}(hstruct file *filph](j0)}(hj3h]hstruct}(hjhhhNhNubah}(h]h ]j<ah"]h$]h&]uh1j/hjubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjubh)}(hhh]jY)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainj4reftypej reftargetjmodnameN classnameNj~ j )}j ]j )}j jsbc.v4l2_fh_openasbuh1hhjubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjY)}(hfilph]hfilp}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jo hjubah}(h]h ]h"]h$]h&]hhuh1ji hjhhhjhK[ubeh}(h]h ]h"]h$]h&]hhjvuh1j)jwjxhjhhhjhK[ubah}(h]jzah ](j|j}eh"]h$]h&]jj)jhuh1j#hjhK[hj|hhubj)}(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.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKShjDhhubah}(h]h ]h"]h$]h&]uh1jhj|hhhjhK[ubeh}(h]h ](j4functioneh"]h$]h&]jj4jj_jj_jjjuh1jhhhjhNhNubj)}(h**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.h](h)}(h**Parameters**h]j)}(hjih]h Parameters}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKWhjcubj)}(hhh]j)}(h-``struct file *filp`` pointer to struct file h](j )}(h``struct file *filp``h]j))}(hjh]hstruct file *filp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKVhjubj )}(hhh]h)}(hpointer to struct fileh]hpointer to struct file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKVhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjhKVhjubah}(h]h ]h"]h$]h&]uh1jhjcubh)}(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:141: ./include/media/v4l2-fh.hhKXhjcubh)}(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 }(hjhhhNhNubh)}(h,:c:type:`struct video_device `h]j))}(hjh]hstruct video_device}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j  video_deviceuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKXhjubh" associated with the file pointer.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKXhjcubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_del (C function) c.v4l2_fh_delhNtauh1j hjhhhNhNubj)}(hhh](j$)}(h%void v4l2_fh_del (struct v4l2_fh *fh)h]j*)}(h$void v4l2_fh_del(struct v4l2_fh *fh)h](j2 )}(hvoidh]hvoid}(hj+hhhNhNubah}(h]h ]j> ah"]h$]h&]uh1j1 hj'hhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKiubjB)}(h h]h }(hj:hhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhj'hhhj9hKiubjS)}(h v4l2_fh_delh]jY)}(h v4l2_fh_delh]h v4l2_fh_del}(hjLhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjHubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhj'hhhj9hKiubjj )}(h(struct v4l2_fh *fh)h]jp )}(hstruct v4l2_fh *fhh](j0)}(hj3h]hstruct}(hjhhhhNhNubah}(h]h ]j<ah"]h$]h&]uh1j/hjdubjB)}(h h]h }(hjuhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjdubh)}(hhh]jY)}(hv4l2_fhh]hv4l2_fh}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainj4reftypej reftargetjmodnameN classnameNj~ j )}j ]j )}j jNsb c.v4l2_fh_delasbuh1hhjdubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjdubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjdubjY)}(hfhh]hfh}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjdubeh}(h]h ]h"]h$]h&]noemphhhuh1jo hj`ubah}(h]h ]h"]h$]h&]hhuh1ji hj'hhhj9hKiubeh}(h]h ]h"]h$]h&]hhjvuh1j)jwjxhj#hhhj9hKiubah}(h]jah ](j|j}eh"]h$]h&]jj)jhuh1j#hj9hKihj hhubj)}(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:141: ./include/media/v4l2-fh.hhK^hjhhubah}(h]h ]h"]h$]h&]uh1jhj hhhj9hKiubeh}(h]h ](j4functioneh"]h$]h&]jj4jjjjjjjuh1jhhhjhNhNubj)}(hX]**Parameters** ``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` **Description** On error filp->private_data will be ``NULL``, otherwise it will point to the :c:type:`struct v4l2_fh `. .. 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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKbhjubj)}(hhh]j)}(hE``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` h](j )}(h``struct v4l2_fh *fh``h]j))}(hj,h]hstruct v4l2_fh *fh}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj*ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK`hj&ubj )}(hhh]h)}(h-pointer to :c:type:`struct v4l2_fh `h](h pointer to }(hjEhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]j))}(hjOh]hstruct v4l2_fh}(hjQhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjMubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j v4l2_fhuh1hhjAhK`hjEubeh}(h]h ]h"]h$]h&]uh1hhjAhK`hjBubah}(h]h ]h"]h$]h&]uh1j hj&ubeh}(h]h ]h"]h$]h&]uh1jhjAhK`hj#ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(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:141: ./include/media/v4l2-fh.hhKbhjubh)}(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 }(hjhhhNhNubj))}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubh!, otherwise it will point to the }(hjhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]j))}(hjh]hstruct v4l2_fh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j v4l2_fhuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKbhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKbhjubj<)}(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]j))}(hjh]hstruct v4l2_fh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j v4l2_fhuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKfhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hKfhjubah}(h]h ]h"]h$]h&]uh1j;hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_exit (C function)c.v4l2_fh_exithNtauh1j hjhhhNhNubj)}(hhh](j$)}(h&void v4l2_fh_exit (struct v4l2_fh *fh)h]j*)}(h%void v4l2_fh_exit(struct v4l2_fh *fh)h](j2 )}(hvoidh]hvoid}(hj<hhhNhNubah}(h]h ]j> ah"]h$]h&]uh1j1 hj8hhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKwubjB)}(h h]h }(hjKhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhj8hhhjJhKwubjS)}(h v4l2_fh_exith]jY)}(h v4l2_fh_exith]h v4l2_fh_exit}(hj]hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjYubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhj8hhhjJhKwubjj )}(h(struct v4l2_fh *fh)h]jp )}(hstruct v4l2_fh *fhh](j0)}(hj3h]hstruct}(hjyhhhNhNubah}(h]h ]j<ah"]h$]h&]uh1j/hjuubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjuubh)}(hhh]jY)}(hv4l2_fhh]hv4l2_fh}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainj4reftypej reftargetjmodnameN classnameNj~ j )}j ]j )}j j_sbc.v4l2_fh_exitasbuh1hhjuubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjuubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjuubjY)}(hfhh]hfh}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjuubeh}(h]h ]h"]h$]h&]noemphhhuh1jo hjqubah}(h]h ]h"]h$]h&]hhuh1ji hj8hhhjJhKwubeh}(h]h ]h"]h$]h&]hhjvuh1j)jwjxhj4hhhjJhKwubah}(h]j/ah ](j|j}eh"]h$]h&]jj)jhuh1j#hjJhKwhj1hhubj)}(hhh]h)}(h+Release resources related to a file handle.h]h+Release resources related to a file handle.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.h RhKlhjhhubah}(h]h ]h"]h$]h&]uh1jhj1hhhjJhKwubeh}(h]h ](j4functioneh"]h$]h&]jj4jjjjjjjuh1jhhhjhNhNubj)}(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)}(hjh]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKphjubj)}(hhh]j)}(hE``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` h](j )}(h``struct v4l2_fh *fh``h]j))}(hj=h]hstruct v4l2_fh *fh}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j(hj;ubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKnhj7ubj )}(hhh]h)}(h-pointer to :c:type:`struct v4l2_fh `h](h pointer to }(hjVhhhNhNubh)}(h":c:type:`struct v4l2_fh `h]j))}(hj`h]hstruct v4l2_fh}(hjbhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hj^ubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j v4l2_fhuh1hhjRhKnhjVubeh}(h]h ]h"]h$]h&]uh1hhjRhKnhjSubah}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ]h"]h$]h&]uh1jhjRhKnhj4ubah}(h]h ]h"]h$]h&]uh1jhjubh)}(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:141: ./include/media/v4l2-fh.hhKphjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKphjubj<)}(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]j))}(hjh]hstruct v4l2_fh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j v4l2_fhuh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKthjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKthjubah}(h]h ]h"]h$]h&]uh1j;hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jv4l2_fh_release (C function)c.v4l2_fh_releasehNtauh1j hjhhhNhNubj)}(hhh](j$)}(h'int v4l2_fh_release (struct file *filp)h]j*)}(h&int v4l2_fh_release(struct file *filp)h](j2 )}(hinth]hint}(hjhhhNhNubah}(h]h ]j> ah"]h$]h&]uh1j1 hjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKubjB)}(h h]h }(hj'hhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjhhhj&hKubjS)}(hv4l2_fh_releaseh]jY)}(hv4l2_fh_releaseh]hv4l2_fh_release}(hj9hhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhj5ubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjhhhj&hKubjj )}(h(struct file *filp)h]jp )}(hstruct file *filph](j0)}(hj3h]hstruct}(hjUhhhNhNubah}(h]h ]j<ah"]h$]h&]uh1j/hjQubjB)}(h h]h }(hjbhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjQubh)}(hhh]jY)}(hfileh]hfile}(hjshhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjpubah}(h]h ]h"]h$]h&] refdomainj4reftypej reftargetjumodnameN classnameNj~ j )}j ]j )}j j;sbc.v4l2_fh_releaseasbuh1hhjQubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjQubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjQubjY)}(hfilph]hfilp}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjQubeh}(h]h ]h"]h$]h&]noemphhhuh1jo hjMubah}(h]h ]h"]h$]h&]hhuh1ji hjhhhj&hKubeh}(h]h ]h"]h$]h&]hhjvuh1j)jwjxhjhhhj&hKubah}(h]j ah ](j|j}eh"]h$]h&]jj)jhuh1j#hj&hKhj hhubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKzhjhhubah}(h]h ]h"]h$]h&]uh1jhj hhhj&hKubeh}(h]h ](j4functioneh"]h$]h&]jj4jjjjjjjuh1jhhhjhNhNubj)}(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)}(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:141: ./include/media/v4l2-fh.hhK~hjubj)}(hhh]j)}(h-``struct file *filp`` pointer to struct file h](j )}(h``struct file *filp``h]j))}(hjh]hstruct file *filp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhK}hjubj )}(hhh]h)}(hpointer to struct fileh]hpointer to struct file}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hK}hj/ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhj.hK}hjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]j)}(hjTh]h Description}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhjubh)}(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 }(hjjhhhNhNubj))}(h``NULL``h]hNULL}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjjubh.}(hjjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhjubh)}(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:141: ./include/media/v4l2-fh.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j v4l2_fh_is_singular (C function)c.v4l2_fh_is_singularhNtauh1j hjhhhNhNubj)}(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](j2 )}(hinth]hint}(hjhhhNhNubah}(h]h ]j> ah"]h$]h&]uh1j1 hjhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjhhhjhKubjS)}(hv4l2_fh_is_singularh]jY)}(hv4l2_fh_is_singularh]hv4l2_fh_is_singular}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjhhhjhKubjj )}(h(struct v4l2_fh *fh)h]jp )}(hstruct v4l2_fh *fhh](j0)}(hj3h]hstruct}(hjhhhNhNubah}(h]h ]j<ah"]h$]h&]uh1j/hjubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjubh)}(hhh]jY)}(hv4l2_fhh]hv4l2_fh}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainj4reftypej reftargetjmodnameN classnameNj~ j )}j ]j )}j jsbc.v4l2_fh_is_singularasbuh1hhjubjB)}(h h]h }(hj5hhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjubj )}(hj h]h*}(hjChhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjY)}(hfhh]hfh}(hjPhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jo hjubah}(h]h ]h"]h$]h&]hhuh1ji hjhhhjhKubeh}(h]h ]h"]h$]h&]hhjvuh1j)jwjxhjhhhjhKubah}(h]jah ](j|j}eh"]h$]h&]jj)jhuh1j#hjhKhjhhubj)}(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.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhjwhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](j4functioneh"]h$]h&]jj4jjjjjjjuh1jhhhjhNhNubj)}(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:141: ./include/media/v4l2-fh.hhKhjubj)}(hhh]j)}(hE``struct v4l2_fh *fh`` pointer to :c:type:`struct v4l2_fh ` h](j )}(h``struct v4l2_fh *fh``h]j))}(hjh]hstruct v4l2_fh *fh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./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]j))}(hjh]hstruct v4l2_fh}(hjhhhNhNubah}(h]h ](hj4c-typeeh"]h$]h&]uh1j(hjubah}(h]h ]h"]h$]h&]refdocj refdomainj4reftypetype refexplicitrefwarnj~ j j v4l2_fhuh1hhjhKhjubeh}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(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:141: ./include/media/v4l2-fh.hhKhjubh)}(h%If **fh** is NULL, then it returns 0.h](hIf }(hj+hhhNhNubj)}(h**fh**h]hfh}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubh is NULL, then it returns 0.}(hj+hhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%v4l2_fh_is_singular_file (C function)c.v4l2_fh_is_singular_filehNtauh1j hjhhhNhNubj)}(hhh](j$)}(h0int v4l2_fh_is_singular_file (struct file *filp)h]j*)}(h/int v4l2_fh_is_singular_file(struct file *filp)h](j2 )}(hinth]hint}(hjlhhhNhNubah}(h]h ]j> ah"]h$]h&]uh1j1 hjhhhha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKubjB)}(h h]h }(hj{hhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjhhhhjzhKubjS)}(hv4l2_fh_is_singular_fileh]jY)}(hv4l2_fh_is_singular_fileh]hv4l2_fh_is_singular_file}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ](jkjleh"]h$]h&]hhuh1jRhjhhhhjzhKubjj )}(h(struct file *filp)h]jp )}(hstruct file *filph](j0)}(hj3h]hstruct}(hjhhhNhNubah}(h]h ]j<ah"]h$]h&]uh1j/hjubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjubh)}(hhh]jY)}(hfileh]hfile}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubah}(h]h ]h"]h$]h&] refdomainj4reftypej reftargetjmodnameN classnameNj~ j )}j ]j )}j jsbc.v4l2_fh_is_singular_fileasbuh1hhjubjB)}(h h]h }(hjhhhNhNubah}(h]h ]jNah"]h$]h&]uh1jAhjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubjY)}(hfilph]hfilp}(hjhhhNhNubah}(h]h ]jdah"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jo hjubah}(h]h ]h"]h$]h&]hhuh1ji hjhhhhjzhKubeh}(h]h ]h"]h$]h&]hhjvuh1j)jwjxhjdhhhjzhKubah}(h]j_ah ](j|j}eh"]h$]h&]jj)jhuh1j#hjzhKhjahhubj)}(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.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhj)hhubah}(h]h ]h"]h$]h&]uh1jhjahhhjzhKubeh}(h]h ](j4functioneh"]h$]h&]jj4jjDjjDjjjuh1jhhhjhNhNubj)}(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)}(hjNh]h Parameters}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhjHubj)}(hhh]j)}(h-``struct file *filp`` pointer to struct file h](j )}(h``struct file *filp``h]j))}(hjmh]hstruct file *filp}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjkubah}(h]h ]h"]h$]h&]uh1j ha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhjgubj )}(hhh]h)}(hpointer to struct fileh]hpointer to struct file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjgubeh}(h]h ]h"]h$]h&]uh1jhjhKhjdubah}(h]h ]h"]h$]h&]uh1jhjHubh)}(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:141: ./include/media/v4l2-fh.hhKhjHubh)}(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:141: ./include/media/v4l2-fh.hhKhjHubh)}(h9If filp->private_data is ``NULL``, then it will return 0.h](hIf filp->private_data is }(hjhhhNhNubj))}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j(hjubh, then it will return 0.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/media/v4l2-fh:141: ./include/media/v4l2-fh.hhKhjHubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubeh}(h]%v4l2-fh-functions-and-data-structuresah ]h"]%v4l2 fh functions and data structuresah$]h&]uh1hhhhhhhhKubeh}(h]v4l2-file-handlersah ]h"]v4l2 file handlersah$]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_handlerj(error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _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}(jjjju nametypes}(jjuh}(jhjjjj%j$ j) jjjzjjj#j/j4j jjjj_jdu 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.