void ump_dd_reference_release(ump_dd_handle memh) { struct hwmem_alloc *alloc = (struct hwmem_alloc *)memh; hwmem_unpin(alloc); hwmem_release(alloc); return; }
static inline void free_operation(struct tee_session *ts, struct hwmem_alloc **alloc, int memrefs_allocated) { int i; for (i = 0; i < memrefs_allocated; ++i) { if (ts->op->shm[i].buffer) { hwmem_kunmap(alloc[i]); hwmem_unpin(alloc[i]); hwmem_release(alloc[i]); ts->op->shm[i].buffer = NULL; } if (ts->vaddr[i]) ts->vaddr[i] = NULL; } kfree(ts->op); ts->op = NULL; }