summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/marvell-ccic/mcam-core.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-04-09 04:05:35 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-05-01 08:59:28 -0300
commit5eab4983777ba913efb42dd0f177b0dcdbd4f3d9 (patch)
tree878a7999f0af3737a51d50d3e56653d3a66b808c /drivers/media/platform/marvell-ccic/mcam-core.c
parent6e80c4738aa12701a5714cb3e4a685f95c1ffe5f (diff)
downloadlinux-5eab4983777ba913efb42dd0f177b0dcdbd4f3d9.tar.bz2
[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/marvell-ccic/mcam-core.c')
-rw-r--r--drivers/media/platform/marvell-ccic/mcam-core.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
index 42f63974592c..c2ebc12917a7 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -1351,14 +1351,17 @@ static int mcam_vidioc_try_fmt_vid_cap(struct file *filp, void *priv,
struct mcam_camera *cam = video_drvdata(filp);
struct mcam_format_struct *f;
struct v4l2_pix_format *pix = &fmt->fmt.pix;
- 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;
f = mcam_find_format(pix->pixelformat);
pix->pixelformat = f->pixelformat;
- v4l2_fill_mbus_format(&mbus_fmt, pix, f->mbus_code);
- ret = sensor_call(cam, video, try_mbus_fmt, &mbus_fmt);
- v4l2_fill_pix_format(pix, &mbus_fmt);
+ v4l2_fill_mbus_format(&format.format, pix, f->mbus_code);
+ ret = sensor_call(cam, pad, set_fmt, &pad_cfg, &format);
+ v4l2_fill_pix_format(pix, &format.format);
pix->bytesperline = pix->width * f->bpp;
switch (f->pixelformat) {
case V4L2_PIX_FMT_YUV420: