aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/tidspbridge/include/dspbridge/cmm.h19
-rw-r--r--drivers/staging/tidspbridge/pmgr/cmm.c17
-rw-r--r--drivers/staging/tidspbridge/rmgr/node.c9
-rw-r--r--drivers/staging/tidspbridge/rmgr/strm.c11
4 files changed, 4 insertions, 52 deletions
diff --git a/drivers/staging/tidspbridge/include/dspbridge/cmm.h b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
index a921f1b6ee7..6ad313fbc66 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/cmm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/cmm.h
@@ -300,25 +300,6 @@ extern int cmm_xlator_create(struct cmm_xlatorobject **xlator,
300 struct cmm_xlatorattrs *xlator_attrs); 300 struct cmm_xlatorattrs *xlator_attrs);
301 301
302/* 302/*
303 * ======== cmm_xlator_delete ========
304 * Purpose:
305 * Delete translator resources
306 * Parameters:
307 * xlator: handle to translator.
308 * force: force = TRUE will free XLators SM buffers/dscriptrs.
309 * Returns:
310 * 0: Success.
311 * -EFAULT: Bad translator handle.
312 * -EPERM: Unable to free translator resources.
313 * Requires:
314 * refs > 0
315 * Ensures:
316 *
317 */
318extern int cmm_xlator_delete(struct cmm_xlatorobject *xlator,
319 bool force);
320
321/*
322 * ======== cmm_xlator_free_buf ======== 303 * ======== cmm_xlator_free_buf ========
323 * Purpose: 304 * Purpose:
324 * Free SM buffer and descriptor. 305 * Free SM buffer and descriptor.
diff --git a/drivers/staging/tidspbridge/pmgr/cmm.c b/drivers/staging/tidspbridge/pmgr/cmm.c
index e3f77bd453f..93a7c4fd57e 100644
--- a/drivers/staging/tidspbridge/pmgr/cmm.c
+++ b/drivers/staging/tidspbridge/pmgr/cmm.c
@@ -968,23 +968,6 @@ int cmm_xlator_create(struct cmm_xlatorobject **xlator,
968} 968}
969 969
970/* 970/*
971 * ======== cmm_xlator_delete ========
972 * Purpose:
973 * Free the Xlator resources.
974 * VM gets freed later.
975 */
976int cmm_xlator_delete(struct cmm_xlatorobject *xlator, bool force)
977{
978 struct cmm_xlator *xlator_obj = (struct cmm_xlator *)xlator;
979
980 DBC_REQUIRE(refs > 0);
981
982 kfree(xlator_obj);
983
984 return 0;
985}
986
987/*
988 * ======== cmm_xlator_alloc_buf ======== 971 * ======== cmm_xlator_alloc_buf ========
989 */ 972 */
990void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf, 973void *cmm_xlator_alloc_buf(struct cmm_xlatorobject *xlator, void *va_buf,
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 84882dc29a5..1562f3c1281 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -2505,7 +2505,6 @@ static void delete_node(struct node_object *hnode,
2505 struct process_context *pr_ctxt) 2505 struct process_context *pr_ctxt)
2506{ 2506{
2507 struct node_mgr *hnode_mgr; 2507 struct node_mgr *hnode_mgr;
2508 struct cmm_xlatorobject *xlator;
2509 struct bridge_drv_interface *intf_fxns; 2508 struct bridge_drv_interface *intf_fxns;
2510 u32 i; 2509 u32 i;
2511 enum node_type node_type; 2510 enum node_type node_type;
@@ -2523,7 +2522,7 @@ static void delete_node(struct node_object *hnode,
2523 hnode_mgr = hnode->hnode_mgr; 2522 hnode_mgr = hnode->hnode_mgr;
2524 if (!hnode_mgr) 2523 if (!hnode_mgr)
2525 goto func_end; 2524 goto func_end;
2526 xlator = hnode->xlator; 2525
2527 node_type = node_get_type(hnode); 2526 node_type = node_get_type(hnode);
2528 if (node_type != NODE_DEVICE) { 2527 if (node_type != NODE_DEVICE) {
2529 node_msg_args = hnode->create_args.asa.node_msg_args; 2528 node_msg_args = hnode->create_args.asa.node_msg_args;
@@ -2619,11 +2618,7 @@ static void delete_node(struct node_object *hnode,
2619 hnode->dcd_props.obj_data.node_obj.pstr_i_alg_name = NULL; 2618 hnode->dcd_props.obj_data.node_obj.pstr_i_alg_name = NULL;
2620 2619
2621 /* Free all SM address translator resources */ 2620 /* Free all SM address translator resources */
2622 if (xlator) { 2621 kfree(hnode->xlator);
2623 (void)cmm_xlator_delete(xlator, true); /* force free */
2624 xlator = NULL;
2625 }
2626
2627 kfree(hnode->nldr_node_obj); 2622 kfree(hnode->nldr_node_obj);
2628 hnode->nldr_node_obj = NULL; 2623 hnode->nldr_node_obj = NULL;
2629 hnode->hnode_mgr = NULL; 2624 hnode->hnode_mgr = NULL;
diff --git a/drivers/staging/tidspbridge/rmgr/strm.c b/drivers/staging/tidspbridge/rmgr/strm.c
index f4986b7cc9e..2e427149fb6 100644
--- a/drivers/staging/tidspbridge/rmgr/strm.c
+++ b/drivers/staging/tidspbridge/rmgr/strm.c
@@ -834,16 +834,9 @@ static int delete_strm(struct strm_object *stream_obj)
834 * is invalid. */ 834 * is invalid. */
835 status = (*intf_fxns->pfn_chnl_close) 835 status = (*intf_fxns->pfn_chnl_close)
836 (stream_obj->chnl_obj); 836 (stream_obj->chnl_obj);
837 /* Free all SM address translator resources */
838 if (!status) {
839 if (stream_obj->xlator) {
840 /* force free */
841 (void)cmm_xlator_delete(stream_obj->
842 xlator,
843 true);
844 }
845 }
846 } 837 }
838 /* Free all SM address translator resources */
839 kfree(stream_obj->xlator);
847 kfree(stream_obj); 840 kfree(stream_obj);
848 } else { 841 } else {
849 status = -EFAULT; 842 status = -EFAULT;