Browse Source

msm: camera: ife: Deinit input mux resources

We must deinit IFE input mux resources before the check for open
count. Without this change the last bus resource is the last to
enter this function when open count reaches zero. So input mux
resources are never deinitialized.

CRs-Fixed: 2545140
Change-Id: I355afce7d631cdb00e3f6da0ba0be40c2e2b63a2
Signed-off-by: Venkat Chinta <[email protected]>
Venkat Chinta 5 years ago
parent
commit
422de0bbf4
1 changed files with 7 additions and 7 deletions
  1. 7 7
      drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.c

+ 7 - 7
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_core.c

@@ -251,6 +251,13 @@ int cam_vfe_deinit_hw(void *hw_priv, void *deinit_hw_args, uint32_t arg_size)
 		return -EINVAL;
 	}
 
+	isp_res = (struct cam_isp_resource_node *)deinit_hw_args;
+	if (isp_res && isp_res->deinit) {
+		rc = isp_res->deinit(isp_res, NULL, 0);
+		if (rc)
+			CAM_ERR(CAM_ISP, "deinit failed");
+	}
+
 	mutex_lock(&vfe_hw->hw_mutex);
 	if (!vfe_hw->open_count) {
 		mutex_unlock(&vfe_hw->hw_mutex);
@@ -281,13 +288,6 @@ int cam_vfe_deinit_hw(void *hw_priv, void *deinit_hw_args, uint32_t arg_size)
 			CAM_ERR(CAM_ISP, "Bus HW deinit Failed rc=%d", rc);
 	}
 
-	isp_res   = (struct cam_isp_resource_node *)deinit_hw_args;
-	if (isp_res && isp_res->deinit) {
-		rc = isp_res->deinit(isp_res, NULL, 0);
-		if (rc)
-			CAM_ERR(CAM_ISP, "deinit failed");
-	}
-
 	rc = cam_vfe_reset(hw_priv, &reset_core_args, sizeof(uint32_t));
 
 	/* Turn OFF Regulators, Clocks and other SOC resources */