linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] DSPBRIDGE: Logical code cleanup in bridge_open()
@ 2009-03-31 15:01 Ameya Palande
  0 siblings, 0 replies; only message in thread
From: Ameya Palande @ 2009-03-31 15:01 UTC (permalink / raw)
  To: h-kanigeri2; +Cc: linux-omap

Signed-off-by: Ameya Palande <ameya.palande@nokia.com>
---
 drivers/dsp/bridge/rmgr/drv_interface.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c b/drivers/dsp/bridge/rmgr/drv_interface.c
index d9504cc..350e1b5 100755
--- a/drivers/dsp/bridge/rmgr/drv_interface.c
+++ b/drivers/dsp/bridge/rmgr/drv_interface.c
@@ -585,7 +585,7 @@ static int bridge_open(struct inode *ip, struct file *filp)
 	DSP_STATUS dsp_status = DSP_SOK;
 	HANDLE	     hDrvObject = NULL;
 	struct PROCESS_CONTEXT    *pPctxt = NULL;
-	struct PROCESS_CONTEXT	*pTmp = NULL;
+	struct PROCESS_CONTEXT	*next_node = NULL;
 	struct PROCESS_CONTEXT    *pCtxtclosed = NULL;
 	struct PROCESS_CONTEXT    *pCtxttraverse = NULL;
 	struct task_struct *tsk = NULL;
@@ -600,6 +600,7 @@ static int bridge_open(struct inode *ip, struct file *filp)
 	DRV_GetProcCtxtList(&pCtxtclosed, (struct DRV_OBJECT *)hDrvObject);
 	while (pCtxtclosed != NULL) {
 		tsk = find_task_by_vpid(pCtxtclosed->pid);
+		next_node = pCtxtclosed->next;
 
 		if ((tsk == NULL) || (tsk->exit_state == EXIT_ZOMBIE)) {
 
@@ -637,14 +638,11 @@ static int bridge_open(struct inode *ip, struct file *filp)
 					}
 				}
 			}
-			pTmp = pCtxtclosed->next;
 			DRV_RemoveProcContext((struct DRV_OBJECT *)hDrvObject,
 					     pCtxtclosed,
 					     (void *)pCtxtclosed->pid);
-		} else {
-			pTmp = pCtxtclosed->next;
 		}
-		pCtxtclosed = pTmp;
+		pCtxtclosed = next_node;
 	}
 func_cont:
 	dsp_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
-- 
1.6.2.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-31 15:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-31 15:01 [PATCH] DSPBRIDGE: Logical code cleanup in bridge_open() Ameya Palande

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).