[PATCH v2 9/9] media: v4l2-subdev: Rename pad config 'try_*' fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The try_fmt, try_crop and try_compose fields of the
v4l2_subdev_pad_config structure are misnamed (for historical reason) as
they also store data for the subdev active configuration. Rename them to
format, crop and compose respectively and update the accessor helpers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
---
 drivers/media/v4l2-core/v4l2-subdev.c |  6 +++---
 include/media/v4l2-subdev.h           | 15 ++++++---------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index fa0a5b2933f6..2357d608194c 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -1694,7 +1694,7 @@ __v4l2_subdev_state_get_format_stream(struct v4l2_subdev_state *state,
 		if (WARN_ON(pad >= state->sd->entity.num_pads))
 			return NULL;
 
-		return &state->pads[pad].try_fmt;
+		return &state->pads[pad].format;
 	}
 
 	lockdep_assert_held(state->lock);
@@ -1728,7 +1728,7 @@ __v4l2_subdev_state_get_crop_stream(struct v4l2_subdev_state *state,
 		if (WARN_ON(pad >= state->sd->entity.num_pads))
 			return NULL;
 
-		return &state->pads[pad].try_crop;
+		return &state->pads[pad].crop;
 	}
 
 	lockdep_assert_held(state->lock);
@@ -1762,7 +1762,7 @@ __v4l2_subdev_state_get_compose_stream(struct v4l2_subdev_state *state,
 		if (WARN_ON(pad >= state->sd->entity.num_pads))
 			return NULL;
 
-		return &state->pads[pad].try_compose;
+		return &state->pads[pad].compose;
 	}
 
 	lockdep_assert_held(state->lock);
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 72131c943e06..b471e68aa5e7 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -688,17 +688,14 @@ struct v4l2_subdev_ir_ops {
 /**
  * struct v4l2_subdev_pad_config - Used for storing subdev pad information.
  *
- * @try_fmt: &struct v4l2_mbus_framefmt
- * @try_crop: &struct v4l2_rect to be used for crop
- * @try_compose: &struct v4l2_rect to be used for compose
- *
- * Note: This struct is also used in active state, and the 'try' prefix is
- * historical and to be removed.
+ * @format: &struct v4l2_mbus_framefmt
+ * @crop: &struct v4l2_rect to be used for crop
+ * @compose: &struct v4l2_rect to be used for compose
  */
 struct v4l2_subdev_pad_config {
-	struct v4l2_mbus_framefmt try_fmt;
-	struct v4l2_rect try_crop;
-	struct v4l2_rect try_compose;
+	struct v4l2_mbus_framefmt format;
+	struct v4l2_rect crop;
+	struct v4l2_rect compose;
 };
 
 /**
-- 
Regards,

Laurent Pinchart




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux