summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/ov7670.c
diff options
context:
space:
mode:
authorHans Verkuil2015-04-09 09:01:33 +0200
committerMauro Carvalho Chehab2015-05-01 13:33:45 +0200
commitebcff5fce6b189306756b0cb06779e15f1c93848 (patch)
tree39b4226a2693a8b51ae38cc3ea39032c611c1ef2 /drivers/media/i2c/ov7670.c
parentdt3155: fix CodingStyle issues (diff)
downloadkernel-qcow2-linux-ebcff5fce6b189306756b0cb06779e15f1c93848.tar.gz
kernel-qcow2-linux-ebcff5fce6b189306756b0cb06779e15f1c93848.tar.xz
kernel-qcow2-linux-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/ov7670.c')
-rw-r--r--drivers/media/i2c/ov7670.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index 394f416b3543..5511208c8308 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -899,13 +899,14 @@ static int ov7670_set_hw(struct v4l2_subdev *sd, int hstart, int hstop,
}
-static int ov7670_enum_mbus_fmt(struct v4l2_subdev *sd, unsigned index,
- u32 *code)
+static int ov7670_enum_mbus_code(struct v4l2_subdev *sd,
+ struct v4l2_subdev_pad_config *cfg,
+ struct v4l2_subdev_mbus_code_enum *code)
{
- if (index >= N_OV7670_FMTS)
+ if (code->pad || code->index >= N_OV7670_FMTS)
return -EINVAL;
- *code = ov7670_formats[index].mbus_code;
+ code->code = ov7670_formats[code->index].mbus_code;
return 0;
}
@@ -1508,7 +1509,6 @@ static const struct v4l2_subdev_core_ops ov7670_core_ops = {
};
static const struct v4l2_subdev_video_ops ov7670_video_ops = {
- .enum_mbus_fmt = ov7670_enum_mbus_fmt,
.try_mbus_fmt = ov7670_try_mbus_fmt,
.s_mbus_fmt = ov7670_s_mbus_fmt,
.s_parm = ov7670_s_parm,
@@ -1518,6 +1518,7 @@ static const struct v4l2_subdev_video_ops ov7670_video_ops = {
static const struct v4l2_subdev_pad_ops ov7670_pad_ops = {
.enum_frame_interval = ov7670_enum_frame_interval,
.enum_frame_size = ov7670_enum_frame_size,
+ .enum_mbus_code = ov7670_enum_mbus_code,
};
static const struct v4l2_subdev_ops ov7670_ops = {