mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
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:
parent
b4f16aace6
commit
c8ac83dc3e
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue