old mode 100755
new mode 100644
@@ -451,44 +451,24 @@ static int __devexit omap34xx_bridge_remove(struct platform_device *pdev)
HANDLE hDrvObject = NULL;
struct PROCESS_CONTEXT *pTmp = NULL;
struct PROCESS_CONTEXT *pCtxtclosed = NULL;
- struct PROCESS_CONTEXT *pCtxttraverse = NULL;
GT_0trace(driverTrace, GT_ENTER, "-> driver_exit\n");
dsp_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
+ if (DSP_FAILED(dsp_status))
+ goto func_cont;
DRV_GetProcCtxtList(&pCtxtclosed, (struct DRV_OBJECT *)hDrvObject);
while (pCtxtclosed != NULL) {
+ GT_1trace(driverTrace, GT_5CLASS, "***Cleanup of "
+ "process***%d\n", pCtxtclosed->pid);
DRV_RemoveAllResources(pCtxtclosed);
- if (pCtxtclosed->hProcessor != NULL) {
- DRV_GetProcCtxtList(&pCtxttraverse,
- (struct DRV_OBJECT *)hDrvObject);
- if (pCtxttraverse->next == NULL) {
- PROC_Detach(pCtxtclosed->hProcessor);
- goto func_cont;
- }
- if ((pCtxtclosed->pid == pCtxttraverse->pid) &&
- (pCtxttraverse->next != NULL)) {
- pCtxttraverse = pCtxttraverse->next;
- }
- while ((pCtxttraverse != NULL) &&
- (pCtxtclosed->hProcessor
- != pCtxttraverse->hProcessor)) {
- pCtxttraverse = pCtxttraverse->next;
- if ((pCtxttraverse != NULL) &&
- (pCtxtclosed->pid == pCtxttraverse->pid)) {
- pCtxttraverse = pCtxttraverse->next;
- }
- }
- if (pCtxttraverse == NULL)
- PROC_Detach(pCtxtclosed->hProcessor);
- }
-func_cont:
+ PROC_Detach(pCtxtclosed->hProcessor);
pTmp = pCtxtclosed->next;
DRV_RemoveProcContext((struct DRV_OBJECT *)hDrvObject,
pCtxtclosed, (void *)pCtxtclosed->pid);
pCtxtclosed = pTmp;
}
-
+func_cont:
/* unregister the clock notifier */
#ifdef CONFIG_BRIDGE_DVFS
if (!clk_notifier_unregister(clk_handle, &iva_clk_notifier)) {