diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2015-04-09 03:01:33 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-01 07:33:45 -0400 |
commit | ebcff5fce6b189306756b0cb06779e15f1c93848 (patch) | |
tree | 39b4226a2693a8b51ae38cc3ea39032c611c1ef2 /drivers/media/platform/soc_camera/soc_camera.c | |
parent | 90874cd61d5f5260714fc1b5728a3fbb28348b53 (diff) |
[media] v4l2: replace enum_mbus_fmt by enum_mbus_code
Replace all calls to the enum_mbus_fmt video op by the pad
enum_mbus_code op and remove the duplicate video op.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kamil Debski <k.debski@samsung.com>
Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/soc_camera/soc_camera.c')
-rw-r--r-- | drivers/media/platform/soc_camera/soc_camera.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index 7bfe7665687f..7fd49cb009d3 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c | |||
@@ -484,10 +484,14 @@ static int soc_camera_init_user_formats(struct soc_camera_device *icd) | |||
484 | struct soc_camera_host *ici = to_soc_camera_host(icd->parent); | 484 | struct soc_camera_host *ici = to_soc_camera_host(icd->parent); |
485 | unsigned int i, fmts = 0, raw_fmts = 0; | 485 | unsigned int i, fmts = 0, raw_fmts = 0; |
486 | int ret; | 486 | int ret; |
487 | u32 code; | 487 | struct v4l2_subdev_mbus_code_enum code = { |
488 | .which = V4L2_SUBDEV_FORMAT_ACTIVE, | ||
489 | }; | ||
488 | 490 | ||
489 | while (!v4l2_subdev_call(sd, video, enum_mbus_fmt, raw_fmts, &code)) | 491 | while (!v4l2_subdev_call(sd, pad, enum_mbus_code, NULL, &code)) { |
490 | raw_fmts++; | 492 | raw_fmts++; |
493 | code.index++; | ||
494 | } | ||
491 | 495 | ||
492 | if (!ici->ops->get_formats) | 496 | if (!ici->ops->get_formats) |
493 | /* | 497 | /* |
@@ -521,11 +525,12 @@ static int soc_camera_init_user_formats(struct soc_camera_device *icd) | |||
521 | fmts = 0; | 525 | fmts = 0; |
522 | for (i = 0; i < raw_fmts; i++) | 526 | for (i = 0; i < raw_fmts; i++) |
523 | if (!ici->ops->get_formats) { | 527 | if (!ici->ops->get_formats) { |
524 | v4l2_subdev_call(sd, video, enum_mbus_fmt, i, &code); | 528 | code.index = i; |
529 | v4l2_subdev_call(sd, pad, enum_mbus_code, NULL, &code); | ||
525 | icd->user_formats[fmts].host_fmt = | 530 | icd->user_formats[fmts].host_fmt = |
526 | soc_mbus_get_fmtdesc(code); | 531 | soc_mbus_get_fmtdesc(code.code); |
527 | if (icd->user_formats[fmts].host_fmt) | 532 | if (icd->user_formats[fmts].host_fmt) |
528 | icd->user_formats[fmts++].code = code; | 533 | icd->user_formats[fmts++].code = code.code; |
529 | } else { | 534 | } else { |
530 | ret = ici->ops->get_formats(icd, i, | 535 | ret = ici->ops->get_formats(icd, i, |
531 | &icd->user_formats[fmts]); | 536 | &icd->user_formats[fmts]); |