Loading drivers/media/platform/msm/camera/cam_core/cam_context.c +2 −2 Original line number Diff line number Diff line Loading @@ -134,8 +134,8 @@ int cam_context_handle_crm_unlink(struct cam_context *ctx, rc = ctx->state_machine[ctx->state].crm_ops.unlink( ctx, unlink); } else { CAM_ERR(CAM_CORE, "No crm unlink in dev %d, state %d", ctx->dev_hdl, ctx->state); CAM_ERR(CAM_CORE, "No crm unlink in dev %d, name %s, state %d", ctx->dev_hdl, ctx->dev_name, ctx->state); rc = -EPROTO; } mutex_unlock(&ctx->ctx_mutex); Loading drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c +15 −4 Original line number Diff line number Diff line Loading @@ -882,12 +882,14 @@ static void __cam_req_mgr_destroy_subdev( * @brief : Cleans up the mem allocated while linking * @link : pointer to link, mem associated with this link is freed * * @return : returns if unlink for any device was success or failure */ static void __cam_req_mgr_destroy_link_info(struct cam_req_mgr_core_link *link) static int __cam_req_mgr_destroy_link_info(struct cam_req_mgr_core_link *link) { int32_t i = 0; struct cam_req_mgr_connected_device *dev; struct cam_req_mgr_core_dev_link_setup link_data; int rc = 0; link_data.link_enable = 0; link_data.link_hdl = link->link_hdl; Loading @@ -900,7 +902,11 @@ static void __cam_req_mgr_destroy_link_info(struct cam_req_mgr_core_link *link) if (dev != NULL) { link_data.dev_hdl = dev->dev_hdl; if (dev->ops && dev->ops->link_setup) dev->ops->link_setup(&link_data); rc = dev->ops->link_setup(&link_data); if (rc) CAM_ERR(CAM_CRM, "Unlink failed dev_hdl %d", dev->dev_hdl); dev->dev_hdl = 0; dev->parent = NULL; dev->ops = NULL; Loading @@ -915,6 +921,7 @@ static void __cam_req_mgr_destroy_link_info(struct cam_req_mgr_core_link *link) link->num_devs = 0; link->max_delay = 0; return rc; } /** Loading Loading @@ -2043,8 +2050,12 @@ int cam_req_mgr_unlink(struct cam_req_mgr_unlink_info *unlink_info) cam_req_mgr_workq_destroy(&link->workq); /* Cleanuprequest tables */ __cam_req_mgr_destroy_link_info(link); /* Cleanup request tables and unlink devices */ rc = __cam_req_mgr_destroy_link_info(link); if (rc) { CAM_ERR(CAM_CORE, "Unlink failed. Cannot proceed"); return rc; } /* Free memory holding data of linked devs */ __cam_req_mgr_destroy_subdev(link->l_dev); Loading drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_util.c +2 −0 Original line number Diff line number Diff line Loading @@ -317,6 +317,8 @@ static int cam_destroy_hdl(int32_t dev_hdl, int dev_hdl_type) } hdl_tbl->hdl[idx].state = HDL_FREE; hdl_tbl->hdl[idx].ops = NULL; hdl_tbl->hdl[idx].priv = NULL; clear_bit(idx, hdl_tbl->bitmap); spin_unlock_bh(&hdl_tbl_lock); Loading Loading
drivers/media/platform/msm/camera/cam_core/cam_context.c +2 −2 Original line number Diff line number Diff line Loading @@ -134,8 +134,8 @@ int cam_context_handle_crm_unlink(struct cam_context *ctx, rc = ctx->state_machine[ctx->state].crm_ops.unlink( ctx, unlink); } else { CAM_ERR(CAM_CORE, "No crm unlink in dev %d, state %d", ctx->dev_hdl, ctx->state); CAM_ERR(CAM_CORE, "No crm unlink in dev %d, name %s, state %d", ctx->dev_hdl, ctx->dev_name, ctx->state); rc = -EPROTO; } mutex_unlock(&ctx->ctx_mutex); Loading
drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_core.c +15 −4 Original line number Diff line number Diff line Loading @@ -882,12 +882,14 @@ static void __cam_req_mgr_destroy_subdev( * @brief : Cleans up the mem allocated while linking * @link : pointer to link, mem associated with this link is freed * * @return : returns if unlink for any device was success or failure */ static void __cam_req_mgr_destroy_link_info(struct cam_req_mgr_core_link *link) static int __cam_req_mgr_destroy_link_info(struct cam_req_mgr_core_link *link) { int32_t i = 0; struct cam_req_mgr_connected_device *dev; struct cam_req_mgr_core_dev_link_setup link_data; int rc = 0; link_data.link_enable = 0; link_data.link_hdl = link->link_hdl; Loading @@ -900,7 +902,11 @@ static void __cam_req_mgr_destroy_link_info(struct cam_req_mgr_core_link *link) if (dev != NULL) { link_data.dev_hdl = dev->dev_hdl; if (dev->ops && dev->ops->link_setup) dev->ops->link_setup(&link_data); rc = dev->ops->link_setup(&link_data); if (rc) CAM_ERR(CAM_CRM, "Unlink failed dev_hdl %d", dev->dev_hdl); dev->dev_hdl = 0; dev->parent = NULL; dev->ops = NULL; Loading @@ -915,6 +921,7 @@ static void __cam_req_mgr_destroy_link_info(struct cam_req_mgr_core_link *link) link->num_devs = 0; link->max_delay = 0; return rc; } /** Loading Loading @@ -2043,8 +2050,12 @@ int cam_req_mgr_unlink(struct cam_req_mgr_unlink_info *unlink_info) cam_req_mgr_workq_destroy(&link->workq); /* Cleanuprequest tables */ __cam_req_mgr_destroy_link_info(link); /* Cleanup request tables and unlink devices */ rc = __cam_req_mgr_destroy_link_info(link); if (rc) { CAM_ERR(CAM_CORE, "Unlink failed. Cannot proceed"); return rc; } /* Free memory holding data of linked devs */ __cam_req_mgr_destroy_subdev(link->l_dev); Loading
drivers/media/platform/msm/camera/cam_req_mgr/cam_req_mgr_util.c +2 −0 Original line number Diff line number Diff line Loading @@ -317,6 +317,8 @@ static int cam_destroy_hdl(int32_t dev_hdl, int dev_hdl_type) } hdl_tbl->hdl[idx].state = HDL_FREE; hdl_tbl->hdl[idx].ops = NULL; hdl_tbl->hdl[idx].priv = NULL; clear_bit(idx, hdl_tbl->bitmap); spin_unlock_bh(&hdl_tbl_lock); Loading