[PATCH 2/3] media: ipu-bridge: use IPU_MAX_PORTS for bridge instead of CIO2_NUM_PORTS

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

 



From: Bingbu Cao <bingbu.cao@xxxxxxxxx>

Before bridge driver use CIO2_NUM_PORTS as the maximum supported CSI2 port
number. Current bridge driver is moved out of ipu3, so define a new macro
in ipu bridge for all IPUs instead of including CIO2 definition.
This patch also removes the ipu3-cio2.h inclusion in ipu-bridge.h.

Signed-off-by: Bingbu Cao <bingbu.cao@xxxxxxxxx>
---
 drivers/media/pci/intel/ipu-bridge.c | 2 +-
 drivers/media/pci/intel/ipu-bridge.h | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index f7134e308696..62daa8c1f6b1 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -301,7 +301,7 @@ static int ipu_bridge_connect_sensor(const struct ipu_sensor_config *cfg,
 		if (!adev->status.enabled)
 			continue;
 
-		if (bridge->n_sensors >= CIO2_NUM_PORTS) {
+		if (bridge->n_sensors >= IPU_MAX_PORTS) {
 			acpi_dev_put(adev);
 			dev_err(&ipu->dev, "Exceeded available IPU ports\n");
 			return -EINVAL;
diff --git a/drivers/media/pci/intel/ipu-bridge.h b/drivers/media/pci/intel/ipu-bridge.h
index d35b5f30ac3f..8cb733c03e2f 100644
--- a/drivers/media/pci/intel/ipu-bridge.h
+++ b/drivers/media/pci/intel/ipu-bridge.h
@@ -6,12 +6,11 @@
 #include <linux/property.h>
 #include <linux/types.h>
 
-#include "ipu3/ipu3-cio2.h"
-
 struct i2c_client;
 
 #define IPU_HID				"INT343E"
 #define IPU_MAX_LANES				4
+#define IPU_MAX_PORTS				4
 #define MAX_NUM_LINK_FREQS			3
 
 /* Values are educated guesses as we don't have a spec */
@@ -140,7 +139,7 @@ struct ipu_bridge {
 	struct software_node ipu_hid_node;
 	u32 data_lanes[4];
 	unsigned int n_sensors;
-	struct ipu_sensor sensors[CIO2_NUM_PORTS];
+	struct ipu_sensor sensors[IPU_MAX_PORTS];
 };
 
 #if IS_ENABLED(CONFIG_IPU_BRIDGE)
-- 
2.40.1




[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