[media] media: videobuf2: Move timestamp to vb2_buffer
[linux-2.6-block.git] / drivers / media / i2c / s5k4ecgx.c
index 70071314789e977b29c52bfd1770a9e770e15c4a..6757aca2cdabe000febe423d5e6cb21b0bab8949 100644 (file)
@@ -27,7 +27,7 @@
 #include <asm/unaligned.h>
 
 #include <media/media-entity.h>
-#include <media/s5k4ecgx.h>
+#include <media/i2c/s5k4ecgx.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-mediabus.h>
@@ -531,7 +531,7 @@ static int s5k4ecgx_try_frame_size(struct v4l2_mbus_framefmt *mf,
 }
 
 static int s5k4ecgx_enum_mbus_code(struct v4l2_subdev *sd,
-                                  struct v4l2_subdev_fh *fh,
+                                  struct v4l2_subdev_pad_config *cfg,
                                   struct v4l2_subdev_mbus_code_enum *code)
 {
        if (code->index >= ARRAY_SIZE(s5k4ecgx_formats))
@@ -541,15 +541,15 @@ static int s5k4ecgx_enum_mbus_code(struct v4l2_subdev *sd,
        return 0;
 }
 
-static int s5k4ecgx_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
+static int s5k4ecgx_get_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
                           struct v4l2_subdev_format *fmt)
 {
        struct s5k4ecgx *priv = to_s5k4ecgx(sd);
        struct v4l2_mbus_framefmt *mf;
 
        if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
-               if (fh) {
-                       mf = v4l2_subdev_get_try_format(fh, 0);
+               if (cfg) {
+                       mf = v4l2_subdev_get_try_format(sd, cfg, 0);
                        fmt->format = *mf;
                }
                return 0;
@@ -581,7 +581,7 @@ static const struct s5k4ecgx_pixfmt *s5k4ecgx_try_fmt(struct v4l2_subdev *sd,
        return &s5k4ecgx_formats[i];
 }
 
-static int s5k4ecgx_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
+static int s5k4ecgx_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg,
                            struct v4l2_subdev_format *fmt)
 {
        struct s5k4ecgx *priv = to_s5k4ecgx(sd);
@@ -596,8 +596,8 @@ static int s5k4ecgx_set_fmt(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh,
        fmt->format.field = V4L2_FIELD_NONE;
 
        if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
-               if (fh) {
-                       mf = v4l2_subdev_get_try_format(fh, 0);
+               if (cfg) {
+                       mf = v4l2_subdev_get_try_format(sd, cfg, 0);
                        *mf = fmt->format;
                }
                return 0;
@@ -692,7 +692,7 @@ static int s5k4ecgx_registered(struct v4l2_subdev *sd)
  */
 static int s5k4ecgx_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 {
-       struct v4l2_mbus_framefmt *mf = v4l2_subdev_get_try_format(fh, 0);
+       struct v4l2_mbus_framefmt *mf = v4l2_subdev_get_try_format(sd, fh->pad, 0);
 
        mf->width = s5k4ecgx_prev_sizes[0].size.width;
        mf->height = s5k4ecgx_prev_sizes[0].size.height;