diff mbox series

[4/5] media: intel/ipu6: Rename ipu6_isys_subdev

Message ID 20250401090953.473339-6-stanislaw.gruszka@linux.intel.com (mailing list archive)
State New
Headers show
Series media: intel/ipu6: initial ipu7 code sharing preparation | expand

Commit Message

Stanislaw Gruszka April 1, 2025, 9:09 a.m. UTC
ipu6_isys_subdev structure will be shared with ipu7, to avoid confusion
rename it to isys_subdev.

Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
---
 drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c |  4 ++--
 drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h |  4 +++-
 .../media/pci/intel/ipu6/ipu6-isys-subdev.c   |  8 ++++----
 .../media/pci/intel/ipu6/ipu6-isys-subdev.h   | 20 ++-----------------
 .../media/pci/intel/ipu6/ipu6-isys-video.c    |  6 +++---
 .../media/pci/intel/ipu6/ipu6-isys-video.h    |  4 ++--
 drivers/media/pci/intel/ipu6/isys.h           | 14 +++++++++++++
 7 files changed, 30 insertions(+), 30 deletions(-)
diff mbox series

Patch

diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
index a59231d81f80..2441f47e8742 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
@@ -224,7 +224,7 @@  static int ipu6_isys_csi2_set_stream(struct v4l2_subdev *sd,
 				     const struct ipu6_isys_csi2_timing *timing,
 				     unsigned int nlanes, int enable)
 {
-	struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
+	struct isys_subdev *asd = to_isys_subdev(sd);
 	struct ipu6_isys_csi2 *csi2 = to_ipu6_isys_csi2(asd);
 	struct ipu6_isys *isys = csi2->isys;
 	struct device *dev = &isys->adev->auxdev.dev;
@@ -339,7 +339,7 @@  static int ipu6_isys_csi2_enable_streams(struct v4l2_subdev *sd,
 					 struct v4l2_subdev_state *state,
 					 u32 pad, u64 streams_mask)
 {
-	struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
+	struct isys_subdev *asd = to_isys_subdev(sd);
 	struct ipu6_isys_csi2 *csi2 = to_ipu6_isys_csi2(asd);
 	struct ipu6_isys_csi2_timing timing = { };
 	struct v4l2_subdev *remote_sd;
diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h
index 24ed13b4a63f..7deafead66cf 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.h
@@ -9,6 +9,8 @@ 
 #include "ipu6-isys-subdev.h"
 #include "ipu6-isys-video.h"
 
+#include "isys.h"
+
 struct media_entity;
 struct v4l2_mbus_frame_desc_entry;
 
@@ -35,7 +37,7 @@  struct ipu6_isys_stream;
 #define CSI2_CSI_RX_DLY_CNT_SETTLE_DLANE_B		-2
 
 struct ipu6_isys_csi2 {
-	struct ipu6_isys_subdev asd;
+	struct isys_subdev asd;
 	struct ipu6_isys *isys;
 	struct ipu6_isys_video av[NR_OF_CSI2_SRC_PADS];
 
diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c b/drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
index 7c6125dc4af4..020c25925ca0 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-subdev.c
@@ -141,7 +141,7 @@  int ipu6_isys_subdev_set_fmt(struct v4l2_subdev *sd,
 			     struct v4l2_subdev_state *state,
 			     struct v4l2_subdev_format *format)
 {
-	struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
+	struct isys_subdev *asd = to_isys_subdev(sd);
 	struct v4l2_mbus_framefmt *fmt;
 	struct v4l2_rect *crop;
 	u32 code = asd->supported_codes[0];
@@ -209,7 +209,7 @@  int ipu6_isys_subdev_enum_mbus_code(struct v4l2_subdev *sd,
 				    struct v4l2_subdev_state *state,
 				    struct v4l2_subdev_mbus_code_enum *code)
 {
-	struct ipu6_isys_subdev *asd = to_ipu6_isys_subdev(sd);
+	struct isys_subdev *asd = to_isys_subdev(sd);
 	const u32 *supported_codes = asd->supported_codes;
 	u32 index;
 
@@ -265,7 +265,7 @@  static const struct v4l2_subdev_internal_ops ipu6_isys_subdev_internal_ops = {
 	.init_state = ipu6_isys_subdev_init_state,
 };
 
-int ipu6_isys_subdev_init(struct ipu6_isys_subdev *asd, struct device *dev,
+int ipu6_isys_subdev_init(struct isys_subdev *asd, struct device *dev,
 			  const struct v4l2_subdev_ops *ops,
 			  unsigned int nr_ctrls, unsigned int num_sink_pads,
 			  unsigned int num_source_pads)
@@ -326,7 +326,7 @@  int ipu6_isys_subdev_init(struct ipu6_isys_subdev *asd, struct device *dev,
 	return ret;
 }
 
-void ipu6_isys_subdev_cleanup(struct ipu6_isys_subdev *asd)
+void ipu6_isys_subdev_cleanup(struct isys_subdev *asd)
 {
 	media_entity_cleanup(&asd->sd.entity);
 	v4l2_ctrl_handler_free(&asd->ctrl_handler);
diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h b/drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
index 544537b4e3db..f3835d873991 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-subdev.h
@@ -4,26 +4,10 @@ 
 #ifndef IPU6_ISYS_SUBDEV_H
 #define IPU6_ISYS_SUBDEV_H
 
-#include <linux/container_of.h>
-
-#include <media/media-entity.h>
-#include <media/v4l2-ctrls.h>
 #include <media/v4l2-subdev.h>
 
 #include "isys.h"
 
-struct ipu6_isys_subdev {
-	struct v4l2_subdev sd;
-	u32 const *supported_codes;
-	struct media_pad *pad;
-	struct v4l2_ctrl_handler ctrl_handler;
-	void (*ctrl_init)(struct v4l2_subdev *sd);
-	int source;	/* SSI stream source; -1 if unset */
-};
-
-#define to_ipu6_isys_subdev(__sd) \
-	container_of(__sd, struct ipu6_isys_subdev, sd)
-
 unsigned int ipu6_isys_mbus_code_to_bpp(u32 code);
 unsigned int ipu6_isys_mbus_code_to_mipi(u32 code);
 bool ipu6_isys_is_bayer_format(u32 code);
@@ -36,9 +20,9 @@  int ipu6_isys_subdev_enum_mbus_code(struct v4l2_subdev *sd,
 				    struct v4l2_subdev_state *state,
 				    struct v4l2_subdev_mbus_code_enum
 				    *code);
-int ipu6_isys_subdev_init(struct ipu6_isys_subdev *asd, struct device *dev,
+int ipu6_isys_subdev_init(struct isys_subdev *asd, struct device *dev,
 			  const struct v4l2_subdev_ops *ops,
 			  unsigned int nr_ctrls, unsigned int num_sink_pads,
 			  unsigned int num_source_pads);
-void ipu6_isys_subdev_cleanup(struct ipu6_isys_subdev *asd);
+void ipu6_isys_subdev_cleanup(struct isys_subdev *asd);
 #endif /* IPU6_ISYS_SUBDEV_H */
diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
index 17ae8bb55234..e36a21aa9040 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c
@@ -869,7 +869,7 @@  void ipu6_isys_put_stream(struct ipu6_isys_stream *stream)
 }
 
 static struct ipu6_isys_stream *
-ipu6_isys_get_stream(struct ipu6_isys_video *av, struct ipu6_isys_subdev *asd)
+ipu6_isys_get_stream(struct ipu6_isys_video *av, struct isys_subdev *asd)
 {
 	struct ipu6_isys_stream *stream = NULL;
 	struct ipu6_isys *isys = av->isys;
@@ -1174,7 +1174,7 @@  int ipu6_isys_setup_video(struct ipu6_isys_video *av,
 	struct v4l2_subdev_route *route = NULL;
 	struct v4l2_subdev_route *r;
 	struct v4l2_subdev_state *state;
-	struct ipu6_isys_subdev *asd;
+	struct isys_subdev *asd;
 	struct v4l2_subdev *remote_sd;
 	struct media_pipeline *pipeline;
 	struct media_pad *source_pad, *remote_pad;
@@ -1189,7 +1189,7 @@  int ipu6_isys_setup_video(struct ipu6_isys_video *av,
 	}
 
 	remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity);
-	asd = to_ipu6_isys_subdev(remote_sd);
+	asd = to_isys_subdev(remote_sd);
 	source_pad = media_pad_remote_pad_first(&remote_pad->entity->pads[0]);
 	if (!source_pad) {
 		dev_dbg(dev, "No external source entity\n");
diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-video.h b/drivers/media/pci/intel/ipu6/ipu6-isys-video.h
index 0cfea78bbc3c..f4dee6120635 100644
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-video.h
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-video.h
@@ -21,7 +21,7 @@ 
 struct file;
 struct ipu6_isys;
 struct ipu6_isys_csi2;
-struct ipu6_isys_subdev;
+struct isys_subdev;
 
 struct ipu6_isys_pixelformat {
 	u32 pixelformat;
@@ -55,7 +55,7 @@  struct ipu6_isys_stream {
 	int stream_source;
 	int stream_handle;
 	unsigned int nr_output_pins;
-	struct ipu6_isys_subdev *asd;
+	struct isys_subdev *asd;
 
 	int nr_queues;	/* Number of capture queues */
 	int nr_streaming;
diff --git a/drivers/media/pci/intel/ipu6/isys.h b/drivers/media/pci/intel/ipu6/isys.h
index d822930e94bb..76f64439952b 100644
--- a/drivers/media/pci/intel/ipu6/isys.h
+++ b/drivers/media/pci/intel/ipu6/isys.h
@@ -4,8 +4,22 @@ 
 #ifndef ISYS_H
 #define ISYS_H
 
+#include <linux/container_of.h>
+
+#include <media/v4l2-ctrls.h>
 #include <media/v4l2-subdev.h>
 
+struct isys_subdev {
+	struct v4l2_subdev sd;
+	u32 const *supported_codes;
+	struct media_pad *pad;
+	struct v4l2_ctrl_handler ctrl_handler;
+	void (*ctrl_init)(struct v4l2_subdev *sd);
+	int source; /* SSI stream source; -1 if unset */
+};
+
+#define to_isys_subdev(__sd) container_of(__sd, struct isys_subdev, sd)
+
 int isys_get_stream_pad_fmt(struct v4l2_subdev *sd, u32 pad, u32 stream,
 			    struct v4l2_mbus_framefmt *format);
 int isys_get_stream_pad_crop(struct v4l2_subdev *sd, u32 pad, u32 stream,