|
@@ -841,8 +841,7 @@ static void __cam_req_mgr_disconnect_req_on_sync_link(
|
|
struct cam_req_mgr_core_link *sync_link;
|
|
struct cam_req_mgr_core_link *sync_link;
|
|
|
|
|
|
for (i = 0; i < slot->num_sync_links; i++) {
|
|
for (i = 0; i < slot->num_sync_links; i++) {
|
|
- sync_link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(slot->sync_link_hdls[i]);
|
|
|
|
|
|
+ sync_link = cam_get_link_priv(slot->sync_link_hdls[i]);
|
|
if (!sync_link)
|
|
if (!sync_link)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
@@ -2238,8 +2237,7 @@ static int __cam_req_mgr_process_req(struct cam_req_mgr_core_link *link,
|
|
} else {
|
|
} else {
|
|
num_sync_links = slot->num_sync_links;
|
|
num_sync_links = slot->num_sync_links;
|
|
for (i = 0; i < num_sync_links; i++)
|
|
for (i = 0; i < num_sync_links; i++)
|
|
- sync_link[i] = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(slot->sync_link_hdls[i]);
|
|
|
|
|
|
+ sync_link[i] = cam_get_link_priv(slot->sync_link_hdls[i]);
|
|
}
|
|
}
|
|
rc = __cam_req_mgr_check_multi_sync_link_ready(
|
|
rc = __cam_req_mgr_check_multi_sync_link_ready(
|
|
link, sync_link, slot, num_sync_links, trigger);
|
|
link, sync_link, slot, num_sync_links, trigger);
|
|
@@ -3892,9 +3890,7 @@ static int cam_req_mgr_cb_add_req(struct cam_req_mgr_add_request *add_req)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(add_req->link_hdl);
|
|
|
|
-
|
|
|
|
|
|
+ link = cam_get_link_priv(add_req->link_hdl);
|
|
if (!link) {
|
|
if (!link) {
|
|
CAM_DBG(CAM_CRM, "link ptr NULL %x", add_req->link_hdl);
|
|
CAM_DBG(CAM_CRM, "link ptr NULL %x", add_req->link_hdl);
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -3991,8 +3987,7 @@ static int cam_req_mgr_cb_notify_err(
|
|
goto end;
|
|
goto end;
|
|
}
|
|
}
|
|
|
|
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(err_info->link_hdl);
|
|
|
|
|
|
+ link = cam_get_link_priv(err_info->link_hdl);
|
|
if (!link) {
|
|
if (!link) {
|
|
CAM_DBG(CAM_CRM, "link ptr NULL %x", err_info->link_hdl);
|
|
CAM_DBG(CAM_CRM, "link ptr NULL %x", err_info->link_hdl);
|
|
rc = -EINVAL;
|
|
rc = -EINVAL;
|
|
@@ -4095,8 +4090,7 @@ static int cam_req_mgr_cb_notify_timer(
|
|
goto end;
|
|
goto end;
|
|
}
|
|
}
|
|
|
|
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(timer_data->link_hdl);
|
|
|
|
|
|
+ link = cam_get_link_priv(timer_data->link_hdl);
|
|
if (!link) {
|
|
if (!link) {
|
|
CAM_DBG(CAM_CRM, "link ptr NULL %x", timer_data->link_hdl);
|
|
CAM_DBG(CAM_CRM, "link ptr NULL %x", timer_data->link_hdl);
|
|
rc = -EINVAL;
|
|
rc = -EINVAL;
|
|
@@ -4150,8 +4144,7 @@ static int cam_req_mgr_cb_notify_stop(
|
|
goto end;
|
|
goto end;
|
|
}
|
|
}
|
|
|
|
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(stop_info->link_hdl);
|
|
|
|
|
|
+ link = cam_get_link_priv(stop_info->link_hdl);
|
|
if (!link) {
|
|
if (!link) {
|
|
CAM_DBG(CAM_CRM, "link ptr NULL %x", stop_info->link_hdl);
|
|
CAM_DBG(CAM_CRM, "link ptr NULL %x", stop_info->link_hdl);
|
|
rc = -EINVAL;
|
|
rc = -EINVAL;
|
|
@@ -4216,8 +4209,7 @@ static int cam_req_mgr_cb_notify_trigger(
|
|
goto end;
|
|
goto end;
|
|
}
|
|
}
|
|
|
|
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(trigger_data->link_hdl);
|
|
|
|
|
|
+ link = cam_get_link_priv(trigger_data->link_hdl);
|
|
if (!link) {
|
|
if (!link) {
|
|
CAM_DBG(CAM_CRM, "link ptr NULL %x", trigger_data->link_hdl);
|
|
CAM_DBG(CAM_CRM, "link ptr NULL %x", trigger_data->link_hdl);
|
|
rc = -EINVAL;
|
|
rc = -EINVAL;
|
|
@@ -4629,7 +4621,7 @@ static int __cam_req_mgr_unlink(
|
|
__cam_req_mgr_destroy_subdev(&link->l_dev);
|
|
__cam_req_mgr_destroy_subdev(&link->l_dev);
|
|
|
|
|
|
/* Destroy the link handle */
|
|
/* Destroy the link handle */
|
|
- rc = cam_destroy_device_hdl(link->link_hdl);
|
|
|
|
|
|
+ rc = cam_destroy_link_hdl(link->link_hdl);
|
|
if (rc < 0) {
|
|
if (rc < 0) {
|
|
CAM_ERR(CAM_CRM, "error destroying link hdl %x rc %d",
|
|
CAM_ERR(CAM_CRM, "error destroying link hdl %x rc %d",
|
|
link->link_hdl, rc);
|
|
link->link_hdl, rc);
|
|
@@ -4655,8 +4647,7 @@ int cam_req_mgr_destroy_session(
|
|
}
|
|
}
|
|
|
|
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
- cam_session = (struct cam_req_mgr_core_session *)
|
|
|
|
- cam_get_device_priv(ses_info->session_hdl);
|
|
|
|
|
|
+ cam_session = cam_get_session_priv(ses_info->session_hdl);
|
|
if (!cam_session || (cam_session->session_hdl != ses_info->session_hdl)) {
|
|
if (!cam_session || (cam_session->session_hdl != ses_info->session_hdl)) {
|
|
CAM_ERR(CAM_CRM, "session: %s, ses_info->ses_hdl:%x, session->ses_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "session: %s, ses_info->ses_hdl:%x, session->ses_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(cam_session), ses_info->session_hdl,
|
|
CAM_IS_NULL_TO_STR(cam_session), ses_info->session_hdl,
|
|
@@ -4728,8 +4719,7 @@ int cam_req_mgr_link(struct cam_req_mgr_ver_info *link_info)
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
|
|
|
|
/* session hdl's priv data is cam session struct */
|
|
/* session hdl's priv data is cam session struct */
|
|
- cam_session = (struct cam_req_mgr_core_session *)
|
|
|
|
- cam_get_device_priv(link_info->u.link_info_v1.session_hdl);
|
|
|
|
|
|
+ cam_session = cam_get_session_priv(link_info->u.link_info_v1.session_hdl);
|
|
if (!cam_session || (cam_session->session_hdl != link_info->u.link_info_v1.session_hdl)) {
|
|
if (!cam_session || (cam_session->session_hdl != link_info->u.link_info_v1.session_hdl)) {
|
|
CAM_ERR(CAM_CRM, "session: %s, link_info->ses_hdl:%x, session->ses_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "session: %s, link_info->ses_hdl:%x, session->ses_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(cam_session), link_info->u.link_info_v1.session_hdl,
|
|
CAM_IS_NULL_TO_STR(cam_session), link_info->u.link_info_v1.session_hdl,
|
|
@@ -4752,8 +4742,8 @@ int cam_req_mgr_link(struct cam_req_mgr_ver_info *link_info)
|
|
root_dev.dev_id = CAM_CRM;
|
|
root_dev.dev_id = CAM_CRM;
|
|
|
|
|
|
mutex_lock(&link->lock);
|
|
mutex_lock(&link->lock);
|
|
- /* Create unique dev handle for link */
|
|
|
|
- link->link_hdl = cam_create_device_hdl(&root_dev);
|
|
|
|
|
|
+ /* Create unique handle for link */
|
|
|
|
+ link->link_hdl = cam_create_link_hdl(&root_dev);
|
|
if (link->link_hdl < 0) {
|
|
if (link->link_hdl < 0) {
|
|
CAM_ERR(CAM_CRM,
|
|
CAM_ERR(CAM_CRM,
|
|
"Insufficient memory to create new device handle");
|
|
"Insufficient memory to create new device handle");
|
|
@@ -4808,7 +4798,7 @@ int cam_req_mgr_link(struct cam_req_mgr_ver_info *link_info)
|
|
setup_failed:
|
|
setup_failed:
|
|
__cam_req_mgr_destroy_subdev(&link->l_dev);
|
|
__cam_req_mgr_destroy_subdev(&link->l_dev);
|
|
create_subdev_failed:
|
|
create_subdev_failed:
|
|
- cam_destroy_device_hdl(link->link_hdl);
|
|
|
|
|
|
+ cam_destroy_link_hdl(link->link_hdl);
|
|
link_info->u.link_info_v1.link_hdl = -1;
|
|
link_info->u.link_info_v1.link_hdl = -1;
|
|
link_hdl_fail:
|
|
link_hdl_fail:
|
|
mutex_unlock(&link->lock);
|
|
mutex_unlock(&link->lock);
|
|
@@ -4840,8 +4830,7 @@ int cam_req_mgr_link_v2(struct cam_req_mgr_ver_info *link_info)
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
|
|
|
|
/* session hdl's priv data is cam session struct */
|
|
/* session hdl's priv data is cam session struct */
|
|
- cam_session = (struct cam_req_mgr_core_session *)
|
|
|
|
- cam_get_device_priv(link_info->u.link_info_v2.session_hdl);
|
|
|
|
|
|
+ cam_session = cam_get_session_priv(link_info->u.link_info_v2.session_hdl);
|
|
if (!cam_session || (cam_session->session_hdl != link_info->u.link_info_v2.session_hdl)) {
|
|
if (!cam_session || (cam_session->session_hdl != link_info->u.link_info_v2.session_hdl)) {
|
|
CAM_ERR(CAM_CRM, "session: %s, link_info->ses_hdl:%x, session->ses_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "session: %s, link_info->ses_hdl:%x, session->ses_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(cam_session), link_info->u.link_info_v2.session_hdl,
|
|
CAM_IS_NULL_TO_STR(cam_session), link_info->u.link_info_v2.session_hdl,
|
|
@@ -4864,8 +4853,8 @@ int cam_req_mgr_link_v2(struct cam_req_mgr_ver_info *link_info)
|
|
root_dev.dev_id = CAM_CRM;
|
|
root_dev.dev_id = CAM_CRM;
|
|
|
|
|
|
mutex_lock(&link->lock);
|
|
mutex_lock(&link->lock);
|
|
- /* Create unique dev handle for link */
|
|
|
|
- link->link_hdl = cam_create_device_hdl(&root_dev);
|
|
|
|
|
|
+ /* Create unique handle for link */
|
|
|
|
+ link->link_hdl = cam_create_link_hdl(&root_dev);
|
|
if (link->link_hdl < 0) {
|
|
if (link->link_hdl < 0) {
|
|
CAM_ERR(CAM_CRM,
|
|
CAM_ERR(CAM_CRM,
|
|
"Insufficient memory to create new device handle");
|
|
"Insufficient memory to create new device handle");
|
|
@@ -4925,7 +4914,7 @@ int cam_req_mgr_link_v2(struct cam_req_mgr_ver_info *link_info)
|
|
setup_failed:
|
|
setup_failed:
|
|
__cam_req_mgr_destroy_subdev(&link->l_dev);
|
|
__cam_req_mgr_destroy_subdev(&link->l_dev);
|
|
create_subdev_failed:
|
|
create_subdev_failed:
|
|
- cam_destroy_device_hdl(link->link_hdl);
|
|
|
|
|
|
+ cam_destroy_link_hdl(link->link_hdl);
|
|
link_info->u.link_info_v2.link_hdl = -1;
|
|
link_info->u.link_info_v2.link_hdl = -1;
|
|
link_hdl_fail:
|
|
link_hdl_fail:
|
|
mutex_unlock(&link->lock);
|
|
mutex_unlock(&link->lock);
|
|
@@ -4950,8 +4939,7 @@ int cam_req_mgr_unlink(struct cam_req_mgr_unlink_info *unlink_info)
|
|
CAM_DBG(CAM_CRM, "link_hdl %x", unlink_info->link_hdl);
|
|
CAM_DBG(CAM_CRM, "link_hdl %x", unlink_info->link_hdl);
|
|
|
|
|
|
/* session hdl's priv data is cam session struct */
|
|
/* session hdl's priv data is cam session struct */
|
|
- cam_session = (struct cam_req_mgr_core_session *)
|
|
|
|
- cam_get_device_priv(unlink_info->session_hdl);
|
|
|
|
|
|
+ cam_session = cam_get_session_priv(unlink_info->session_hdl);
|
|
if (!cam_session || (cam_session->session_hdl != unlink_info->session_hdl)) {
|
|
if (!cam_session || (cam_session->session_hdl != unlink_info->session_hdl)) {
|
|
CAM_ERR(CAM_CRM, "session: %s, unlink_info->ses_hdl:%x, cam_session->ses_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "session: %s, unlink_info->ses_hdl:%x, cam_session->ses_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(cam_session), unlink_info->session_hdl,
|
|
CAM_IS_NULL_TO_STR(cam_session), unlink_info->session_hdl,
|
|
@@ -4961,7 +4949,7 @@ int cam_req_mgr_unlink(struct cam_req_mgr_unlink_info *unlink_info)
|
|
}
|
|
}
|
|
|
|
|
|
/* link hdl's priv data is core_link struct */
|
|
/* link hdl's priv data is core_link struct */
|
|
- link = cam_get_device_priv(unlink_info->link_hdl);
|
|
|
|
|
|
+ link = cam_get_link_priv(unlink_info->link_hdl);
|
|
if (!link || (link->link_hdl != unlink_info->link_hdl)) {
|
|
if (!link || (link->link_hdl != unlink_info->link_hdl)) {
|
|
CAM_ERR(CAM_CRM, "link: %s, unlink_info->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "link: %s, unlink_info->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(link), unlink_info->link_hdl,
|
|
CAM_IS_NULL_TO_STR(link), unlink_info->link_hdl,
|
|
@@ -4996,8 +4984,7 @@ int cam_req_mgr_schedule_request(
|
|
}
|
|
}
|
|
|
|
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(sched_req->link_hdl);
|
|
|
|
|
|
+ link = cam_get_link_priv(sched_req->link_hdl);
|
|
if (!link || (link->link_hdl != sched_req->link_hdl)) {
|
|
if (!link || (link->link_hdl != sched_req->link_hdl)) {
|
|
CAM_ERR(CAM_CRM, "link: %s, sched_req->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "link: %s, sched_req->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(link), sched_req->link_hdl,
|
|
CAM_IS_NULL_TO_STR(link), sched_req->link_hdl,
|
|
@@ -5062,8 +5049,7 @@ int cam_req_mgr_schedule_request_v2(
|
|
|
|
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
|
|
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(sched_req->link_hdl);
|
|
|
|
|
|
+ link = cam_get_link_priv(sched_req->link_hdl);
|
|
if (!link || (link->link_hdl != sched_req->link_hdl)) {
|
|
if (!link || (link->link_hdl != sched_req->link_hdl)) {
|
|
CAM_ERR(CAM_CRM, "link: %s, sched_req->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "link: %s, sched_req->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(link), sched_req->link_hdl,
|
|
CAM_IS_NULL_TO_STR(link), sched_req->link_hdl,
|
|
@@ -5124,8 +5110,7 @@ int cam_req_mgr_schedule_request_v2(
|
|
goto end;
|
|
goto end;
|
|
}
|
|
}
|
|
|
|
|
|
- sync_links[i] = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(sched_req->link_hdls[i]);
|
|
|
|
|
|
+ sync_links[i] = cam_get_link_priv(sched_req->link_hdls[i]);
|
|
if (!sync_links[i] ||
|
|
if (!sync_links[i] ||
|
|
(sync_links[i]->link_hdl != sched_req->link_hdls[i])) {
|
|
(sync_links[i]->link_hdl != sched_req->link_hdls[i])) {
|
|
CAM_ERR(CAM_CRM,
|
|
CAM_ERR(CAM_CRM,
|
|
@@ -5187,8 +5172,7 @@ int cam_req_mgr_sync_config(
|
|
|
|
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
/* session hdl's priv data is cam session struct */
|
|
/* session hdl's priv data is cam session struct */
|
|
- cam_session = (struct cam_req_mgr_core_session *)
|
|
|
|
- cam_get_device_priv(sync_info->session_hdl);
|
|
|
|
|
|
+ cam_session = cam_get_session_priv(sync_info->session_hdl);
|
|
if (!cam_session || (cam_session->session_hdl != sync_info->session_hdl)) {
|
|
if (!cam_session || (cam_session->session_hdl != sync_info->session_hdl)) {
|
|
CAM_ERR(CAM_CRM, "session: %s, sync_info->session_hdl:%x, session->ses_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "session: %s, sync_info->session_hdl:%x, session->ses_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(cam_session), sync_info->session_hdl,
|
|
CAM_IS_NULL_TO_STR(cam_session), sync_info->session_hdl,
|
|
@@ -5207,7 +5191,7 @@ int cam_req_mgr_sync_config(
|
|
goto done;
|
|
goto done;
|
|
}
|
|
}
|
|
|
|
|
|
- link[i] = cam_get_device_priv(sync_info->link_hdls[i]);
|
|
|
|
|
|
+ link[i] = cam_get_link_priv(sync_info->link_hdls[i]);
|
|
if (!link[i] || (link[i]->link_hdl != sync_info->link_hdls[i])) {
|
|
if (!link[i] || (link[i]->link_hdl != sync_info->link_hdls[i])) {
|
|
CAM_ERR(CAM_CRM, "link: %s, sync_info->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "link: %s, sync_info->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(link), sync_info->link_hdls[i],
|
|
CAM_IS_NULL_TO_STR(link), sync_info->link_hdls[i],
|
|
@@ -5284,9 +5268,9 @@ int cam_req_mgr_flush_requests(
|
|
}
|
|
}
|
|
|
|
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
|
|
+
|
|
/* session hdl's priv data is cam session struct */
|
|
/* session hdl's priv data is cam session struct */
|
|
- session = (struct cam_req_mgr_core_session *)
|
|
|
|
- cam_get_device_priv(flush_info->session_hdl);
|
|
|
|
|
|
+ session = cam_get_session_priv(flush_info->session_hdl);
|
|
if (!session || (session->session_hdl != flush_info->session_hdl)) {
|
|
if (!session || (session->session_hdl != flush_info->session_hdl)) {
|
|
CAM_ERR(CAM_CRM, "session: %s, flush_info->ses_hdl:%x, session->ses_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "session: %s, flush_info->ses_hdl:%x, session->ses_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(session), flush_info->session_hdl,
|
|
CAM_IS_NULL_TO_STR(session), flush_info->session_hdl,
|
|
@@ -5300,8 +5284,7 @@ int cam_req_mgr_flush_requests(
|
|
goto end;
|
|
goto end;
|
|
}
|
|
}
|
|
|
|
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(flush_info->link_hdl);
|
|
|
|
|
|
+ link = cam_get_link_priv(flush_info->link_hdl);
|
|
if (!link || (link->link_hdl != flush_info->link_hdl)) {
|
|
if (!link || (link->link_hdl != flush_info->link_hdl)) {
|
|
CAM_ERR(CAM_CRM, "link: %s, flush_info->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "link: %s, flush_info->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(link), flush_info->link_hdl,
|
|
CAM_IS_NULL_TO_STR(link), flush_info->link_hdl,
|
|
@@ -5365,8 +5348,7 @@ int cam_req_mgr_link_control(struct cam_req_mgr_link_control *control)
|
|
|
|
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
for (i = 0; i < control->num_links; i++) {
|
|
for (i = 0; i < control->num_links; i++) {
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(control->link_hdls[i]);
|
|
|
|
|
|
+ link = cam_get_link_priv(control->link_hdls[i]);
|
|
if (!link || (link->link_hdl != control->link_hdls[i])) {
|
|
if (!link || (link->link_hdl != control->link_hdls[i])) {
|
|
CAM_ERR(CAM_CRM, "link: %s, control->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "link: %s, control->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(link), control->link_hdls[i],
|
|
CAM_IS_NULL_TO_STR(link), control->link_hdls[i],
|
|
@@ -5437,8 +5419,7 @@ int cam_req_mgr_link_properties(struct cam_req_mgr_link_properties *properties)
|
|
struct cam_req_mgr_link_evt_data evt_data;
|
|
struct cam_req_mgr_link_evt_data evt_data;
|
|
|
|
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(properties->link_hdl);
|
|
|
|
|
|
+ link = cam_get_link_priv(properties->link_hdl);
|
|
if (!link || (link->link_hdl != properties->link_hdl)) {
|
|
if (!link || (link->link_hdl != properties->link_hdl)) {
|
|
CAM_ERR(CAM_CRM, "link: %s, properties->link_hdl:0x%x, link->link_hdl:0x%x",
|
|
CAM_ERR(CAM_CRM, "link: %s, properties->link_hdl:0x%x, link->link_hdl:0x%x",
|
|
CAM_IS_NULL_TO_STR(link), properties->link_hdl,
|
|
CAM_IS_NULL_TO_STR(link), properties->link_hdl,
|
|
@@ -5613,8 +5594,7 @@ int cam_req_mgr_dump_request(struct cam_dump_req_cmd *dump_req)
|
|
|
|
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
mutex_lock(&g_crm_core_dev->crm_lock);
|
|
/* session hdl's priv data is cam session struct */
|
|
/* session hdl's priv data is cam session struct */
|
|
- session = (struct cam_req_mgr_core_session *)
|
|
|
|
- cam_get_device_priv(dump_req->session_handle);
|
|
|
|
|
|
+ session = cam_get_session_priv(dump_req->session_handle);
|
|
if (!session || (session->session_hdl != dump_req->session_handle)) {
|
|
if (!session || (session->session_hdl != dump_req->session_handle)) {
|
|
CAM_ERR(CAM_CRM, "session: %s, dump_req->ses_hdl:%x, session->ses_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "session: %s, dump_req->ses_hdl:%x, session->ses_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(session), dump_req->session_handle,
|
|
CAM_IS_NULL_TO_STR(session), dump_req->session_handle,
|
|
@@ -5628,8 +5608,7 @@ int cam_req_mgr_dump_request(struct cam_dump_req_cmd *dump_req)
|
|
goto end;
|
|
goto end;
|
|
}
|
|
}
|
|
|
|
|
|
- link = (struct cam_req_mgr_core_link *)
|
|
|
|
- cam_get_device_priv(dump_req->link_hdl);
|
|
|
|
|
|
+ link = cam_get_link_priv(dump_req->link_hdl);
|
|
if (!link || (link->link_hdl != dump_req->link_hdl)) {
|
|
if (!link || (link->link_hdl != dump_req->link_hdl)) {
|
|
CAM_ERR(CAM_CRM, "link: %s, dump_req->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_ERR(CAM_CRM, "link: %s, dump_req->link_hdl:%x, link->link_hdl:%x",
|
|
CAM_IS_NULL_TO_STR(link), dump_req->link_hdl,
|
|
CAM_IS_NULL_TO_STR(link), dump_req->link_hdl,
|