summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/vs6624.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-04-09 04:01:33 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-05-01 08:33:45 -0300
commitebcff5fce6b189306756b0cb06779e15f1c93848 (patch)
tree39b4226a2693a8b51ae38cc3ea39032c611c1ef2 /drivers/media/i2c/vs6624.c
parent90874cd61d5f5260714fc1b5728a3fbb28348b53 (diff)
downloadlinux-stable-ebcff5fce6b189306756b0cb06779e15f1c93848.tar.gz
linux-stable-ebcff5fce6b189306756b0cb06779e15f1c93848.tar.bz2
linux-stable-ebcff5fce6b189306756b0cb06779e15f1c93848.zip
[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/i2c/vs6624.c')
-rw-r--r--drivers/media/i2c/vs6624.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/i2c/vs6624.c b/drivers/media/i2c/vs6624.c
index 00e7f043977e..b1d0a1b28ca8 100644
--- a/drivers/media/i2c/vs6624.c
+++ b/drivers/media/i2c/vs6624.c
@@ -557,13 +557,14 @@ static int vs6624_s_ctrl(struct v4l2_ctrl *ctrl)
return 0;
}
-static int vs6624_enum_mbus_fmt(struct v4l2_subdev *sd, unsigned index,
- u32 *code)
+static int vs6624_enum_mbus_code(struct v4l2_subdev *sd,
+ struct v4l2_subdev_pad_config *cfg,
+ struct v4l2_subdev_mbus_code_enum *code)
{
- if (index >= ARRAY_SIZE(vs6624_formats))
+ if (code->pad || code->index >= ARRAY_SIZE(vs6624_formats))
return -EINVAL;
- *code = vs6624_formats[index].mbus_code;
+ code->code = vs6624_formats[code->index].mbus_code;
return 0;
}
@@ -738,7 +739,6 @@ static const struct v4l2_subdev_core_ops vs6624_core_ops = {
};
static const struct v4l2_subdev_video_ops vs6624_video_ops = {
- .enum_mbus_fmt = vs6624_enum_mbus_fmt,
.try_mbus_fmt = vs6624_try_mbus_fmt,
.s_mbus_fmt = vs6624_s_mbus_fmt,
.g_mbus_fmt = vs6624_g_mbus_fmt,
@@ -747,9 +747,14 @@ static const struct v4l2_subdev_video_ops vs6624_video_ops = {
.s_stream = vs6624_s_stream,
};
+static const struct v4l2_subdev_pad_ops vs6624_pad_ops = {
+ .enum_mbus_code = vs6624_enum_mbus_code,
+};
+
static const struct v4l2_subdev_ops vs6624_ops = {
.core = &vs6624_core_ops,
.video = &vs6624_video_ops,
+ .pad = &vs6624_pad_ops,
};
static int vs6624_probe(struct i2c_client *client,