소스 검색

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;
 	}