diff options
Diffstat (limited to 'kernel/drivers/media/i2c/saa7115.c')
-rw-r--r-- | kernel/drivers/media/i2c/saa7115.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/kernel/drivers/media/i2c/saa7115.c b/kernel/drivers/media/i2c/saa7115.c index 7147c8b68..91e75222c 100644 --- a/kernel/drivers/media/i2c/saa7115.c +++ b/kernel/drivers/media/i2c/saa7115.c @@ -1170,12 +1170,18 @@ static int saa711x_s_sliced_fmt(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_f return 0; } -static int saa711x_s_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *fmt) +static int saa711x_set_fmt(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_format *format) { - if (fmt->code != MEDIA_BUS_FMT_FIXED) + struct v4l2_mbus_framefmt *fmt = &format->format; + + if (format->pad || fmt->code != MEDIA_BUS_FMT_FIXED) return -EINVAL; fmt->field = V4L2_FIELD_INTERLACED; fmt->colorspace = V4L2_COLORSPACE_SMPTE170M; + if (format->which == V4L2_SUBDEV_FORMAT_TRY) + return 0; return saa711x_set_size(sd, fmt->width, fmt->height); } @@ -1603,7 +1609,6 @@ static const struct v4l2_subdev_video_ops saa711x_video_ops = { .s_std = saa711x_s_std, .s_routing = saa711x_s_routing, .s_crystal_freq = saa711x_s_crystal_freq, - .s_mbus_fmt = saa711x_s_mbus_fmt, .s_stream = saa711x_s_stream, .querystd = saa711x_querystd, .g_input_status = saa711x_g_input_status, @@ -1617,12 +1622,17 @@ static const struct v4l2_subdev_vbi_ops saa711x_vbi_ops = { .s_raw_fmt = saa711x_s_raw_fmt, }; +static const struct v4l2_subdev_pad_ops saa711x_pad_ops = { + .set_fmt = saa711x_set_fmt, +}; + static const struct v4l2_subdev_ops saa711x_ops = { .core = &saa711x_core_ops, .tuner = &saa711x_tuner_ops, .audio = &saa711x_audio_ops, .video = &saa711x_video_ops, .vbi = &saa711x_vbi_ops, + .pad = &saa711x_pad_ops, }; #define CHIP_VER_SIZE 16 @@ -1919,7 +1929,6 @@ MODULE_DEVICE_TABLE(i2c, saa711x_id); static struct i2c_driver saa711x_driver = { .driver = { - .owner = THIS_MODULE, .name = "saa7115", }, .probe = saa711x_probe, |