media: v4l2-subdev: add subdev-wide state struct
[linux-2.6-microblaze.git] / drivers / media / i2c / tw9910.c
index a25a350..09f5b39 100644 (file)
@@ -720,7 +720,7 @@ tw9910_set_fmt_error:
 }
 
 static int tw9910_get_selection(struct v4l2_subdev *sd,
-                               struct v4l2_subdev_pad_config *cfg,
+                               struct v4l2_subdev_state *sd_state,
                                struct v4l2_subdev_selection *sel)
 {
        struct i2c_client *client = v4l2_get_subdevdata(sd);
@@ -746,7 +746,7 @@ static int tw9910_get_selection(struct v4l2_subdev *sd,
 }
 
 static int tw9910_get_fmt(struct v4l2_subdev *sd,
-                         struct v4l2_subdev_pad_config *cfg,
+                         struct v4l2_subdev_state *sd_state,
                          struct v4l2_subdev_format *format)
 {
        struct v4l2_mbus_framefmt *mf = &format->format;
@@ -797,7 +797,7 @@ static int tw9910_s_fmt(struct v4l2_subdev *sd,
 }
 
 static int tw9910_set_fmt(struct v4l2_subdev *sd,
-                         struct v4l2_subdev_pad_config *cfg,
+                         struct v4l2_subdev_state *sd_state,
                          struct v4l2_subdev_format *format)
 {
        struct v4l2_mbus_framefmt *mf = &format->format;
@@ -829,7 +829,7 @@ static int tw9910_set_fmt(struct v4l2_subdev *sd,
        if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE)
                return tw9910_s_fmt(sd, mf);
 
-       cfg->try_fmt = *mf;
+       sd_state->pads->try_fmt = *mf;
 
        return 0;
 }
@@ -886,7 +886,7 @@ static const struct v4l2_subdev_core_ops tw9910_subdev_core_ops = {
 };
 
 static int tw9910_enum_mbus_code(struct v4l2_subdev *sd,
-                                struct v4l2_subdev_pad_config *cfg,
+                                struct v4l2_subdev_state *sd_state,
                                 struct v4l2_subdev_mbus_code_enum *code)
 {
        if (code->pad || code->index)