summaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-05-29 06:59:57 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-17 08:18:29 -0400
commit2249aa5c97a017be4e3b5bb0e9a3ca2d2ed31b27 (patch)
tree4e5449abaf34ece02dee15a52ca789c6f64da63f /Documentation/video4linux
parentabbec2d401d6698db44e632f5adbef2a47e6e812 (diff)
[media] v4l2-framework: replace g_chip_ident by g_std in the examples
The framework documentation used the g_chip_ident op as an example. This op has been removed, so replace its use in the examples by the g_std op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/video4linux')
-rw-r--r--Documentation/video4linux/v4l2-framework.txt13
1 files changed, 6 insertions, 7 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index a300b283a1a0..24353ecab197 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -246,7 +246,6 @@ may be NULL if the subdev driver does not support anything from that category.
246It looks like this: 246It looks like this:
247 247
248struct v4l2_subdev_core_ops { 248struct v4l2_subdev_core_ops {
249 int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip);
250 int (*log_status)(struct v4l2_subdev *sd); 249 int (*log_status)(struct v4l2_subdev *sd);
251 int (*init)(struct v4l2_subdev *sd, u32 val); 250 int (*init)(struct v4l2_subdev *sd, u32 val);
252 ... 251 ...
@@ -346,24 +345,24 @@ Afterwards the subdev module can be unloaded and sd->dev == NULL.
346 345
347You can call an ops function either directly: 346You can call an ops function either directly:
348 347
349 err = sd->ops->core->g_chip_ident(sd, &chip); 348 err = sd->ops->core->g_std(sd, &norm);
350 349
351but it is better and easier to use this macro: 350but it is better and easier to use this macro:
352 351
353 err = v4l2_subdev_call(sd, core, g_chip_ident, &chip); 352 err = v4l2_subdev_call(sd, core, g_std, &norm);
354 353
355The macro will to the right NULL pointer checks and returns -ENODEV if subdev 354The macro will to the right NULL pointer checks and returns -ENODEV if subdev
356is NULL, -ENOIOCTLCMD if either subdev->core or subdev->core->g_chip_ident is 355is NULL, -ENOIOCTLCMD if either subdev->core or subdev->core->g_std is
357NULL, or the actual result of the subdev->ops->core->g_chip_ident ops. 356NULL, or the actual result of the subdev->ops->core->g_std ops.
358 357
359It is also possible to call all or a subset of the sub-devices: 358It is also possible to call all or a subset of the sub-devices:
360 359
361 v4l2_device_call_all(v4l2_dev, 0, core, g_chip_ident, &chip); 360 v4l2_device_call_all(v4l2_dev, 0, core, g_std, &norm);
362 361
363Any subdev that does not support this ops is skipped and error results are 362Any subdev that does not support this ops is skipped and error results are
364ignored. If you want to check for errors use this: 363ignored. If you want to check for errors use this:
365 364
366 err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_chip_ident, &chip); 365 err = v4l2_device_call_until_err(v4l2_dev, 0, core, g_std, &norm);
367 366
368Any error except -ENOIOCTLCMD will exit the loop with that error. If no 367Any error except -ENOIOCTLCMD will exit the loop with that error. If no
369errors (except -ENOIOCTLCMD) occurred, then 0 is returned. 368errors (except -ENOIOCTLCMD) occurred, then 0 is returned.