summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/adv7175.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-04-09 10:02:34 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-05-01 14:36:17 +0300
commitda298c6d98d531de778ba8dd6657b1093ef855d0 (patch)
tree55a80a5affa0669aae9834e94f536f7786401309 /drivers/media/i2c/adv7175.c
parentebcff5fce6b189306756b0cb06779e15f1c93848 (diff)
downloadlinux-da298c6d98d531de778ba8dd6657b1093ef855d0.tar.xz
[media] v4l2: replace video op g_mbus_fmt by pad op get_fmt
The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses by the get_fmt pad op and remove the video op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Cc: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/adv7175.c')
-rw-r--r--drivers/media/i2c/adv7175.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/i2c/adv7175.c b/drivers/media/i2c/adv7175.c
index 3f40304e856c..f7443454f682 100644
--- a/drivers/media/i2c/adv7175.c
+++ b/drivers/media/i2c/adv7175.c
@@ -311,11 +311,16 @@ static int adv7175_enum_mbus_code(struct v4l2_subdev *sd,
return 0;
}
-static int adv7175_g_fmt(struct v4l2_subdev *sd,
- struct v4l2_mbus_framefmt *mf)
+static int adv7175_get_fmt(struct v4l2_subdev *sd,
+ struct v4l2_subdev_pad_config *cfg,
+ struct v4l2_subdev_format *format)
{
+ struct v4l2_mbus_framefmt *mf = &format->format;
u8 val = adv7175_read(sd, 0x7);
+ if (format->pad)
+ return -EINVAL;
+
if ((val & 0x40) == (1 << 6))
mf->code = MEDIA_BUS_FMT_UYVY8_1X16;
else
@@ -376,11 +381,11 @@ static const struct v4l2_subdev_video_ops adv7175_video_ops = {
.s_std_output = adv7175_s_std_output,
.s_routing = adv7175_s_routing,
.s_mbus_fmt = adv7175_s_fmt,
- .g_mbus_fmt = adv7175_g_fmt,
};
static const struct v4l2_subdev_pad_ops adv7175_pad_ops = {
.enum_mbus_code = adv7175_enum_mbus_code,
+ .get_fmt = adv7175_get_fmt,
};
static const struct v4l2_subdev_ops adv7175_ops = {