media: v4l2-subdev: add subdev-wide state struct
[linux-2.6-microblaze.git] / drivers / media / platform / xilinx / xilinx-vip.c
index a4eb576..425a32d 100644 (file)
@@ -234,7 +234,7 @@ EXPORT_SYMBOL_GPL(xvip_cleanup_resources);
 /**
  * xvip_enum_mbus_code - Enumerate the media format code
  * @subdev: V4L2 subdevice
- * @cfg: V4L2 subdev pad configuration
+ * @sd_state: V4L2 subdev state
  * @code: returning media bus code
  *
  * Enumerate the media bus code of the subdevice. Return the corresponding
@@ -246,7 +246,7 @@ EXPORT_SYMBOL_GPL(xvip_cleanup_resources);
  * is not valid.
  */
 int xvip_enum_mbus_code(struct v4l2_subdev *subdev,
-                       struct v4l2_subdev_pad_config *cfg,
+                       struct v4l2_subdev_state *sd_state,
                        struct v4l2_subdev_mbus_code_enum *code)
 {
        struct v4l2_mbus_framefmt *format;
@@ -260,7 +260,7 @@ int xvip_enum_mbus_code(struct v4l2_subdev *subdev,
        if (code->index)
                return -EINVAL;
 
-       format = v4l2_subdev_get_try_format(subdev, cfg, code->pad);
+       format = v4l2_subdev_get_try_format(subdev, sd_state, code->pad);
 
        code->code = format->code;
 
@@ -271,7 +271,7 @@ EXPORT_SYMBOL_GPL(xvip_enum_mbus_code);
 /**
  * xvip_enum_frame_size - Enumerate the media bus frame size
  * @subdev: V4L2 subdevice
- * @cfg: V4L2 subdev pad configuration
+ * @sd_state: V4L2 subdev state
  * @fse: returning media bus frame size
  *
  * This function is a drop-in implementation of the subdev enum_frame_size pad
@@ -284,7 +284,7 @@ EXPORT_SYMBOL_GPL(xvip_enum_mbus_code);
  * if the index or the code is not valid.
  */
 int xvip_enum_frame_size(struct v4l2_subdev *subdev,
-                        struct v4l2_subdev_pad_config *cfg,
+                        struct v4l2_subdev_state *sd_state,
                         struct v4l2_subdev_frame_size_enum *fse)
 {
        struct v4l2_mbus_framefmt *format;
@@ -295,7 +295,7 @@ int xvip_enum_frame_size(struct v4l2_subdev *subdev,
        if (fse->which == V4L2_SUBDEV_FORMAT_ACTIVE)
                return -EINVAL;
 
-       format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad);
+       format = v4l2_subdev_get_try_format(subdev, sd_state, fse->pad);
 
        if (fse->index || fse->code != format->code)
                return -EINVAL;