Explorar o código

Merge "msm: camera: cci: Increase HW block support for CCI" into camera-kernel.lnx.5.0

Camera Software Integration %!s(int64=3) %!d(string=hai) anos
pai
achega
1f9de29a6d

+ 4 - 5
drivers/cam_sensor_module/cam_cci/cam_cci_dev.c

@@ -11,19 +11,18 @@
 
 #define CCI_MAX_DELAY 1000000
 
-static struct v4l2_subdev *g_cci_subdev[MAX_CCI];
+static struct v4l2_subdev *g_cci_subdev[MAX_CCI] = { 0 };
 static struct dentry *debugfs_root;
 
 struct v4l2_subdev *cam_cci_get_subdev(int cci_dev_index)
 {
 	struct v4l2_subdev *sub_device = NULL;
 
-	if (cci_dev_index < MAX_CCI)
+	if ((cci_dev_index < MAX_CCI) && (g_cci_subdev[cci_dev_index] != NULL))
 		sub_device = g_cci_subdev[cci_dev_index];
 	else
-		CAM_WARN(CAM_CCI, "Index: %u is beyond max num CCI allowed: %u",
-			cci_dev_index,
-			MAX_CCI);
+		CAM_WARN(CAM_CCI, "CCI subdev not available at Index: %u, MAX_CCI : %u",
+			cci_dev_index, MAX_CCI);
 
 	return sub_device;
 }

+ 1 - 1
drivers/cam_sensor_module/cam_cci/cam_cci_dev.h

@@ -59,7 +59,7 @@
 
 #define CAM_CCI_WORKQUEUE_NAME "cam_cci_wq"
 
-#define MAX_CCI 2
+#define MAX_CCI 3
 
 #define PRIORITY_QUEUE (QUEUE_0)
 #define SYNC_QUEUE (QUEUE_1)