Преглед на файлове

msm: camera: cci: Correct the condition check

Submodules per master uninitialize check needs to be set to false
when all submodules are released for that master. Correct the
refcount check for the appropriate operation.

CRs-Fixed: 2686487
Change-Id: Iaea94e4d1ad83bef99d40cec4e96de3993783ec1
Signed-off-by: Jigarkumar Zala <[email protected]>
Jigarkumar Zala преди 5 години
родител
ревизия
c8ac83dc3e
променени са 1 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 6 2
      drivers/cam_sensor_module/cam_cci/cam_cci_soc.c

+ 6 - 2
drivers/cam_sensor_module/cam_cci/cam_cci_soc.c

@@ -403,11 +403,15 @@ int cam_cci_soc_release(struct cci_device *cci_dev,
 		return -EINVAL;
 	}
 
-	if (--cci_dev->master_active_slave[master])
+	if (!(--cci_dev->master_active_slave[master])) {
 		cci_dev->cci_master_info[master].is_initilized = false;
+		CAM_DBG(CAM_CCI,
+			"All submodules are released for master: %d", master);
+	}
 
 	if (--cci_dev->ref_count) {
-		CAM_DBG(CAM_CCI, "ref_count Exit %d", cci_dev->ref_count);
+		CAM_DBG(CAM_CCI, "Submodule release: Ref_count: %d",
+			cci_dev->ref_count);
 		return 0;
 	}