diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-05-29 06:59:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-06-17 08:18:29 -0400 |
commit | 2249aa5c97a017be4e3b5bb0e9a3ca2d2ed31b27 (patch) | |
tree | 4e5449abaf34ece02dee15a52ca789c6f64da63f /Documentation/video4linux | |
parent | abbec2d401d6698db44e632f5adbef2a47e6e812 (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.txt | 13 |
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. | |||
246 | It looks like this: | 246 | It looks like this: |
247 | 247 | ||
248 | struct v4l2_subdev_core_ops { | 248 | struct 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 | ||
347 | You can call an ops function either directly: | 346 | You 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 | ||
351 | but it is better and easier to use this macro: | 350 | but 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 | ||
355 | The macro will to the right NULL pointer checks and returns -ENODEV if subdev | 354 | The macro will to the right NULL pointer checks and returns -ENODEV if subdev |
356 | is NULL, -ENOIOCTLCMD if either subdev->core or subdev->core->g_chip_ident is | 355 | is NULL, -ENOIOCTLCMD if either subdev->core or subdev->core->g_std is |
357 | NULL, or the actual result of the subdev->ops->core->g_chip_ident ops. | 356 | NULL, or the actual result of the subdev->ops->core->g_std ops. |
358 | 357 | ||
359 | It is also possible to call all or a subset of the sub-devices: | 358 | It 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 | ||
363 | Any subdev that does not support this ops is skipped and error results are | 362 | Any subdev that does not support this ops is skipped and error results are |
364 | ignored. If you want to check for errors use this: | 363 | ignored. 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 | ||
368 | Any error except -ENOIOCTLCMD will exit the loop with that error. If no | 367 | Any error except -ENOIOCTLCMD will exit the loop with that error. If no |
369 | errors (except -ENOIOCTLCMD) occurred, then 0 is returned. | 368 | errors (except -ENOIOCTLCMD) occurred, then 0 is returned. |