Ver código fonte

msm: camera: common: Remove dead code from the camera driver

Remove dead code from the camera driver.

CRs-Fixed: 3328154
Change-Id: I7dea63fed8f6c35825db079f89f8c34f6730f155
Signed-off-by: Chandan Kumar Jha <[email protected]>
Chandan Kumar Jha 2 anos atrás
pai
commit
bdc7e0866b

+ 7 - 2
drivers/cam_cdm/cam_cdm_hw_core.c

@@ -383,9 +383,14 @@ void cam_hw_cdm_dump_core_debug_registers(struct cam_hw_info *cdm_hw,
 		}
 
 		core_dbg &= ~(CAM_CDM_CORE_DBG_TEST_BUS_EN_MASK |
-			CAM_CDM_CORE_DBG_TEST_BUS_SEL_MASK);
+			CAM_CDM_CORE_DBG_TEST_BUS_SEL_MASK) |
+			CAM_CDM_CORE_DBG_LOG_AHB_MASK |
+			CAM_CDM_CORE_DBG_FIFO_RB_EN_MASK;
 		cam_hw_cdm_enable_core_dbg(cdm_hw, core_dbg);
-	} else {
+	}
+
+	if (core_dbg & CAM_CDM_CORE_DBG_LOG_AHB_MASK ||
+			core_dbg & CAM_CDM_CORE_DBG_FIFO_RB_EN_MASK){
 		cam_hw_cdm_enable_core_dbg(cdm_hw, core_dbg);
 
 		cam_cdm_read_hw_reg(cdm_hw, core->offsets->cmn_reg->debug_status,

+ 0 - 3
drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus_wr.c

@@ -2213,9 +2213,6 @@ static int cam_sfe_bus_wr_user_dump(
 		}
 
 		rsrc_node = &bus_priv->sfe_out[sfe_out_type];
-		if (!rsrc_node)
-			continue;
-
 		if (rsrc_node->res_state < CAM_ISP_RESOURCE_STATE_RESERVED) {
 			CAM_DBG(CAM_ISP,
 				"SFE BUS WR: path inactive res ID: %d, continuing",

+ 0 - 2
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c

@@ -4564,8 +4564,6 @@ int cam_vfe_bus_ver3_init(
 	return rc;
 
 deinit_vfe_out:
-	if (i < 0)
-		i = bus_priv->num_out;
 	for (--i; i >= 0; i--)
 		cam_vfe_bus_ver3_deinit_vfe_out_resource(&bus_priv->vfe_out[i]);
 

+ 0 - 15
drivers/cam_req_mgr/cam_req_mgr_core.c

@@ -321,9 +321,6 @@ static int __cam_req_mgr_notify_frame_skip(
 
 	for (i = 0; i < link->num_devs; i++) {
 		dev = &link->l_dev[i];
-		if (!dev)
-			continue;
-
 		pd = dev->dev_info.p_delay;
 		if (pd >= CAM_PIPELINE_DELAY_MAX) {
 			CAM_WARN(CAM_CRM, "pd %d greater than max",
@@ -1077,8 +1074,6 @@ static int __cam_req_mgr_send_req(struct cam_req_mgr_core_link *link,
 	 */
 	for (i = 0; i < link->num_devs; i++) {
 		dev = &link->l_dev[i];
-		if (!dev)
-			continue;
 		pd = dev->dev_info.p_delay;
 		if (pd >= CAM_PIPELINE_DELAY_MAX) {
 			CAM_WARN(CAM_CRM, "pd %d greater than max",
@@ -2597,9 +2592,6 @@ static int __cam_req_mgr_disconnect_link(struct cam_req_mgr_core_link *link)
 	/* Using device ops unlink devices */
 	for (i = 0; i < link->num_devs; i++) {
 		dev = &link->l_dev[i];
-		if (dev == NULL)
-			continue;
-
 		link_data.dev_hdl = dev->dev_hdl;
 		if (dev->ops && dev->ops->link_setup) {
 			rc = dev->ops->link_setup(&link_data);
@@ -3524,9 +3516,6 @@ static void cam_req_mgr_notify_eof_event(struct cam_req_mgr_core_link *link)
 
 	for (i = 0; i < link->num_devs; i++) {
 		dev = &link->l_dev[i];
-		if (!dev)
-			continue;
-
 		evt_data.dev_hdl = dev->dev_hdl;
 		evt_data.evt_type = CAM_REQ_MGR_LINK_EVT_EOF;
 		evt_data.link_hdl = link->link_hdl;
@@ -5215,10 +5204,6 @@ int cam_req_mgr_link_properties(struct cam_req_mgr_link_properties *properties)
 
 	for (i = 0; i < link->num_devs; i++) {
 		dev = &link->l_dev[i];
-
-		if (!dev)
-			continue;
-
 		evt_data.dev_hdl = dev->dev_hdl;
 		evt_data.link_hdl = link->link_hdl;
 		evt_data.evt_type = CAM_REQ_MGR_LINK_EVT_UPDATE_PROPERTIES;

+ 0 - 2
drivers/cam_utils/cam_soc_util.c

@@ -2741,8 +2741,6 @@ put_clk:
 		soc_info->mmrm_handle = NULL;
 	}
 
-	if (i == -1)
-		i = soc_info->num_clk;
 	for (i = i - 1; i >= 0; i--) {
 		if (soc_info->clk[i]) {
 			if (CAM_IS_BIT_SET(soc_info->shared_clk_mask, i))