diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2015-04-09 09:02:34 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-01 13:36:17 +0200 |
commit | da298c6d98d531de778ba8dd6657b1093ef855d0 (patch) | |
tree | 55a80a5affa0669aae9834e94f536f7786401309 /drivers/media/i2c/adv7183.c | |
parent | [media] v4l2: replace enum_mbus_fmt by enum_mbus_code (diff) | |
download | linux-da298c6d98d531de778ba8dd6657b1093ef855d0.tar.xz linux-da298c6d98d531de778ba8dd6657b1093ef855d0.zip |
[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/adv7183.c')
-rw-r--r-- | drivers/media/i2c/adv7183.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/i2c/adv7183.c b/drivers/media/i2c/adv7183.c index a0bcfefc28fc..9d58b750ef1e 100644 --- a/drivers/media/i2c/adv7183.c +++ b/drivers/media/i2c/adv7183.c @@ -460,12 +460,16 @@ static int adv7183_s_mbus_fmt(struct v4l2_subdev *sd, return 0; } -static int adv7183_g_mbus_fmt(struct v4l2_subdev *sd, - struct v4l2_mbus_framefmt *fmt) +static int adv7183_get_fmt(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_format *format) { struct adv7183 *decoder = to_adv7183(sd); - *fmt = decoder->fmt; + if (format->pad) + return -EINVAL; + + format->format = decoder->fmt; return 0; } @@ -517,12 +521,12 @@ static const struct v4l2_subdev_video_ops adv7183_video_ops = { .g_input_status = adv7183_g_input_status, .try_mbus_fmt = adv7183_try_mbus_fmt, .s_mbus_fmt = adv7183_s_mbus_fmt, - .g_mbus_fmt = adv7183_g_mbus_fmt, .s_stream = adv7183_s_stream, }; static const struct v4l2_subdev_pad_ops adv7183_pad_ops = { .enum_mbus_code = adv7183_enum_mbus_code, + .get_fmt = adv7183_get_fmt, }; static const struct v4l2_subdev_ops adv7183_ops = { |