aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2025-08-10 04:30:14 +0300
committerHans Verkuil <hverkuil+cisco@kernel.org>2025-08-13 08:33:46 +0200
commitbb4d6be205dae94aa2d3c3a1ad814dad90d4fd62 (patch)
tree1e87cbfad5a1ad1ad201a6daa5680768636a46cb /Documentation/driver-api
parentb3d945ba42dd640255492a523baeb6b6946a99bf (diff)
downloadnet-bb4d6be205dae94aa2d3c3a1ad814dad90d4fd62.tar.gz
media: Drop V4L2_FL_USES_V4L2_FH checks
Now that all drivers use v4l2_fh, we can drop the V4L2_FL_USES_V4L2_FH checks through the V4L2 core. To ensure that all new drivers use v4l2_fh, keep setting the V4L2_FL_USES_V4L2_FH flag in v4l2_fh_init(), and verify it is set after the .open() file operation returns. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r--Documentation/driver-api/media/v4l2-fh.rst15
1 files changed, 2 insertions, 13 deletions
diff --git a/Documentation/driver-api/media/v4l2-fh.rst b/Documentation/driver-api/media/v4l2-fh.rst
index afcad22ead7c91..a934caa483a438 100644
--- a/Documentation/driver-api/media/v4l2-fh.rst
+++ b/Documentation/driver-api/media/v4l2-fh.rst
@@ -3,13 +3,8 @@
V4L2 File handles
-----------------
-struct v4l2_fh provides a way to easily keep file handle specific
-data that is used by the V4L2 framework.
-
-.. attention::
- New drivers must use struct v4l2_fh
- since it is also used to implement priority handling
- (:ref:`VIDIOC_G_PRIORITY`).
+struct 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.
struct v4l2_fh is allocated in the driver's ``open()`` file operation handler.
It is typically embedded in a larger driver-specific structure. The
@@ -134,12 +129,6 @@ associated device node:
- Same, but it calls v4l2_fh_is_singular with filp->private_data.
-.. note::
- The V4L2 framework knows 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.
-
V4L2 fh functions and data structures
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^