[media] v4l2: replace video op g_mbus_fmt by pad op get_fmt
[sfrench/cifs-2.6.git] / drivers / media / i2c / tvp514x.c
index a822d1541614b22c5e677d5170f2b819423649d7..24e47279e30c1e99129a8fa802029531c6703288 100644 (file)
@@ -746,35 +746,6 @@ static int tvp514x_s_ctrl(struct v4l2_ctrl *ctrl)
        return err;
 }
 
-/**
- * tvp514x_mbus_fmt() - V4L2 decoder interface handler for try/s/g_mbus_fmt
- * @sd: pointer to standard V4L2 sub-device structure
- * @f: pointer to the mediabus format structure
- *
- * Negotiates the image capture size and mediabus format.
- */
-static int
-tvp514x_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f)
-{
-       struct tvp514x_decoder *decoder = to_decoder(sd);
-       enum tvp514x_std current_std;
-
-       if (f == NULL)
-               return -EINVAL;
-
-       /* Calculate height and width based on current standard */
-       current_std = decoder->current_std;
-
-       f->code = MEDIA_BUS_FMT_YUYV8_2X8;
-       f->width = decoder->std_list[current_std].width;
-       f->height = decoder->std_list[current_std].height;
-       f->field = V4L2_FIELD_INTERLACED;
-       f->colorspace = V4L2_COLORSPACE_SMPTE170M;
-       v4l2_dbg(1, debug, sd, "MBUS_FMT: Width - %d, Height - %d\n",
-                       f->width, f->height);
-       return 0;
-}
-
 /**
  * tvp514x_g_parm() - V4L2 decoder interface handler for g_parm
  * @sd: pointer to standard V4L2 sub-device structure
@@ -943,6 +914,9 @@ static int tvp514x_get_pad_format(struct v4l2_subdev *sd,
        struct tvp514x_decoder *decoder = to_decoder(sd);
        __u32 which = format->which;
 
+       if (format->pad)
+               return -EINVAL;
+
        if (which == V4L2_SUBDEV_FORMAT_ACTIVE) {
                format->format = decoder->format;
                return 0;
@@ -997,9 +971,6 @@ static const struct v4l2_subdev_video_ops tvp514x_video_ops = {
        .s_std = tvp514x_s_std,
        .s_routing = tvp514x_s_routing,
        .querystd = tvp514x_querystd,
-       .g_mbus_fmt = tvp514x_mbus_fmt,
-       .try_mbus_fmt = tvp514x_mbus_fmt,
-       .s_mbus_fmt = tvp514x_mbus_fmt,
        .g_parm = tvp514x_g_parm,
        .s_parm = tvp514x_s_parm,
        .s_stream = tvp514x_s_stream,