All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: Documentation: fix v4l2-subdev incorrect ops field and category references
@ 2026-06-20  8:18 Tharit Tangkijwanichakul
  0 siblings, 0 replies; only message in thread
From: Tharit Tangkijwanichakul @ 2026-06-20  8:18 UTC (permalink / raw)
  To: linux-media
  Cc: skhan, linux-kernel-mentees, Tharit Tangkijwanichakul,
	Mauro Carvalho Chehab, linux-kernel

The v4l2-subdev documentation incorrectly refers to the "core" ops
while it should have been the "video" ops where the actual
operation (g_std) belongs to. The docs also declares a duplicate
"video" struct member instead of "pad" in the subdev ops struct example.

Signed-off-by: Tharit Tangkijwanichakul <tharitt97@gmail.com>
---
 Documentation/driver-api/media/v4l2-subdev.rst | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Documentation/driver-api/media/v4l2-subdev.rst b/Documentation/driver-api/media/v4l2-subdev.rst
index 13aec460e..d30bb656b 100644
--- a/Documentation/driver-api/media/v4l2-subdev.rst
+++ b/Documentation/driver-api/media/v4l2-subdev.rst
@@ -77,7 +77,7 @@ It looks like this:
 		const struct v4l2_subdev_tuner_ops *tuner;
 		const struct v4l2_subdev_audio_ops *audio;
 		const struct v4l2_subdev_video_ops *video;
-		const struct v4l2_subdev_pad_ops *video;
+		const struct v4l2_subdev_pad_ops *pad;
 	};
 
 The core ops are common to all subdevs, the other categories are implemented
@@ -300,31 +300,31 @@ directly:
 
 .. code-block:: c
 
-	err = sd->ops->core->g_std(sd, &norm);
+	err = sd->ops->video->g_std(sd, &norm);
 
 but it is better and easier to use this macro:
 
 .. code-block:: c
 
-	err = v4l2_subdev_call(sd, core, g_std, &norm);
+	err = v4l2_subdev_call(sd, video, g_std, &norm);
 
 The macro will do the right ``NULL`` pointer checks and returns ``-ENODEV``
 if :c:type:`sd <v4l2_subdev>` is ``NULL``, ``-ENOIOCTLCMD`` if either
-:c:type:`sd <v4l2_subdev>`->core or :c:type:`sd <v4l2_subdev>`->core->g_std is ``NULL``, or the actual result of the
-:c:type:`sd <v4l2_subdev>`->ops->core->g_std ops.
+:c:type:`sd <v4l2_subdev>`->video or :c:type:`sd <v4l2_subdev>`->video->g_std is ``NULL``, or the actual result of the
+:c:type:`sd <v4l2_subdev>`->ops->video->g_std ops.
 
 It is also possible to call all or a subset of the sub-devices:
 
 .. code-block:: c
 
-	v4l2_device_call_all(v4l2_dev, 0, core, g_std, &norm);
+	v4l2_device_call_all(v4l2_dev, 0, video, g_std, &norm);
 
 Any subdev that does not support this ops is skipped and error results are
 ignored. If you want to check for errors use this:
 
 .. code-block:: c
 
-	err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_std, &norm);
+	err = v4l2_device_call_until_err(v4l2_dev, 0, video, g_std, &norm);
 
 Any error except ``-ENOIOCTLCMD`` will exit the loop with that error. If no
 errors (except ``-ENOIOCTLCMD``) occurred, then 0 is returned.
-- 
2.53.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-20  8:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-20  8:18 [PATCH] media: Documentation: fix v4l2-subdev incorrect ops field and category references Tharit Tangkijwanichakul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.