diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2015-04-09 10:05:35 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-01 14:59:28 +0300 |
commit | 5eab4983777ba913efb42dd0f177b0dcdbd4f3d9 (patch) | |
tree | 878a7999f0af3737a51d50d3e56653d3a66b808c /drivers/media/platform/blackfin | |
parent | 6e80c4738aa12701a5714cb3e4a685f95c1ffe5f (diff) | |
download | linux-5eab4983777ba913efb42dd0f177b0dcdbd4f3d9.tar.xz |
[media] v4l2: replace try_mbus_fmt by set_fmt in bridge drivers
Replace all calls to try_mbus_fmt in bridge drivers by calls to the
set_fmt pad op.
[mchehab@osg.samsung.com: fix a merge conflict at mcam-core.c]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/blackfin')
-rw-r--r-- | drivers/media/platform/blackfin/bfin_capture.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c index 6ea11b1e755e..aa50eba623c3 100644 --- a/drivers/media/platform/blackfin/bfin_capture.c +++ b/drivers/media/platform/blackfin/bfin_capture.c @@ -602,7 +602,10 @@ static int bcap_try_format(struct bcap_device *bcap, { struct bcap_format *sf = bcap->sensor_formats; struct bcap_format *fmt = NULL; - struct v4l2_mbus_framefmt mbus_fmt; + struct v4l2_subdev_pad_config pad_cfg; + struct v4l2_subdev_format format = { + .which = V4L2_SUBDEV_FORMAT_TRY, + }; int ret, i; for (i = 0; i < bcap->num_sensor_formats; i++) { @@ -613,16 +616,16 @@ static int bcap_try_format(struct bcap_device *bcap, if (i == bcap->num_sensor_formats) fmt = &sf[0]; - v4l2_fill_mbus_format(&mbus_fmt, pixfmt, fmt->mbus_code); - ret = v4l2_subdev_call(bcap->sd, video, - try_mbus_fmt, &mbus_fmt); + v4l2_fill_mbus_format(&format.format, pixfmt, fmt->mbus_code); + ret = v4l2_subdev_call(bcap->sd, pad, set_fmt, &pad_cfg, + &format); if (ret < 0) return ret; - v4l2_fill_pix_format(pixfmt, &mbus_fmt); + v4l2_fill_pix_format(pixfmt, &format.format); if (bcap_fmt) { for (i = 0; i < bcap->num_sensor_formats; i++) { fmt = &sf[i]; - if (mbus_fmt.code == fmt->mbus_code) + if (format.format.code == fmt->mbus_code) break; } *bcap_fmt = *fmt; |