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 <jzala@codeaurora.org>
This commit is contained in:
Jigarkumar Zala 2020-06-22 09:32:47 -07:00 • committed by Gerrit - the friendly Code Review server
commit c8ac83dc3e

View file

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