Signed-off-by: Ameya Palande <[email protected]>
---
arch/arm/plat-omap/include/dspbridge/strm.h | 3 +-
drivers/dsp/bridge/pmgr/wcd.c | 2 +-
drivers/dsp/bridge/rmgr/strm.c | 28 ++++++--------------------
3 files changed, 10 insertions(+), 23 deletions(-)
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h
b/arch/arm/plat-omap/include/dspbridge/strm.h
index 23a9f17..9929210 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ b/arch/arm/plat-omap/include/dspbridge/strm.h
@@ -84,7 +84,8 @@
extern DSP_STATUS STRM_AllocateBuffer(struct STRM_OBJECT *hStrm,
u32 uSize,
OUT u8 **apBuffer,
- u32 uNumBufs);
+ u32 uNumBufs,
+ struct PROCESS_CONTEXT *pr_ctxt);
/*
* ======== STRM_Close ========
diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index c9b29ea..4fdcb18 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -1493,7 +1493,7 @@ u32 STRMWRAP_AllocateBuffer(union Trapped_Args *args,
void *pr_ctxt)
status = STRM_AllocateBuffer(args->ARGS_STRM_ALLOCATEBUFFER.hStream,
args->ARGS_STRM_ALLOCATEBUFFER.uSize,
- apBuffer, uNumBufs);
+ apBuffer, uNumBufs, pr_ctxt);
cp_to_usr(args->ARGS_STRM_ALLOCATEBUFFER.apBuffer, apBuffer, status,
uNumBufs);
if (apBuffer)
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index e25818f..d68251f 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -154,18 +154,15 @@ static void DeleteStrmMgr(struct STRM_MGR *hStrmMgr);
* Allocates buffers for a stream.
*/
DSP_STATUS STRM_AllocateBuffer(struct STRM_OBJECT *hStrm, u32 uSize,
- OUT u8 **apBuffer, u32 uNumBufs)
+ OUT u8 **apBuffer, u32 uNumBufs,
+ struct PROCESS_CONTEXT *pr_ctxt)
{
DSP_STATUS status = DSP_SOK;
u32 uAllocated = 0;
u32 i;
- #ifndef RES_CLEANUP_DISABLE
- DSP_STATUS res_status = DSP_SOK;
- u32 hProcess;
- HANDLE pCtxt = NULL;
- HANDLE hDrvObject;
+#ifndef RES_CLEANUP_DISABLE
HANDLE hSTRMRes;
- #endif
+#endif
DBC_Require(cRefs > 0);
DBC_Require(apBuffer != NULL);
@@ -203,20 +200,9 @@ DSP_STATUS STRM_AllocateBuffer(struct STRM_OBJECT *hStrm,
u32 uSize,
if (DSP_FAILED(status))
goto func_end;
- /* Return TGID instead of process handle */
- hProcess = current->tgid;
-
- res_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
- if (DSP_FAILED(res_status))
- goto func_end;
-
- DRV_GetProcContext(hProcess, (struct DRV_OBJECT *)hDrvObject,
- &pCtxt, NULL, 0);
- if (pCtxt != NULL) {
- if (DRV_GetSTRMResElement(hStrm, &hSTRMRes, pCtxt) !=
- DSP_ENOTFOUND) {
- DRV_ProcUpdateSTRMRes(uNumBufs, hSTRMRes, pCtxt);
- }
+ if (DRV_GetSTRMResElement(hStrm, &hSTRMRes, pr_ctxt) !=
+ DSP_ENOTFOUND) {
+ DRV_ProcUpdateSTRMRes(uNumBufs, hSTRMRes, pr_ctxt);
}
#endif
func_end:
--
1.6.2.4
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html