Commit dc8ca196 authored by Omar Ramirez Luna's avatar Omar Ramirez Luna Committed by Hari Kanigeri

DSPBRIDGE: switch to pid_task for resource cleanup

Switching find_task_by_vpid call to pid_task, according to
clean ups in pid module.

Reference:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=17f98dcf6010a1cfd25d179fd0ce77d3dc2685c3Signed-off-by: default avatarOmar Ramirez Luna <omar.ramirez@ti.com>
parent f92508c9
...@@ -575,6 +575,7 @@ static int bridge_open(struct inode *ip, struct file *filp) ...@@ -575,6 +575,7 @@ static int bridge_open(struct inode *ip, struct file *filp)
struct PROCESS_CONTEXT *pCtxtclosed = NULL; struct PROCESS_CONTEXT *pCtxtclosed = NULL;
struct PROCESS_CONTEXT *pCtxttraverse = NULL; struct PROCESS_CONTEXT *pCtxttraverse = NULL;
struct task_struct *tsk = NULL; struct task_struct *tsk = NULL;
struct pid *pnr = NULL;
GT_0trace(driverTrace, GT_ENTER, "-> driver_open\n"); GT_0trace(driverTrace, GT_ENTER, "-> driver_open\n");
dsp_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT); dsp_status = CFG_GetObject((u32 *)&hDrvObject, REG_DRV_OBJECT);
...@@ -585,7 +586,8 @@ static int bridge_open(struct inode *ip, struct file *filp) ...@@ -585,7 +586,8 @@ static int bridge_open(struct inode *ip, struct file *filp)
DRV_GetProcCtxtList(&pCtxtclosed, (struct DRV_OBJECT *)hDrvObject); DRV_GetProcCtxtList(&pCtxtclosed, (struct DRV_OBJECT *)hDrvObject);
while (pCtxtclosed != NULL) { while (pCtxtclosed != NULL) {
tsk = find_task_by_vpid(pCtxtclosed->pid); pnr = find_get_pid(pCtxtclosed->pid);
tsk = pid_task(pnr, PIDTYPE_PID);
next_node = pCtxtclosed->next; next_node = pCtxtclosed->next;
if ((tsk == NULL) || (tsk->exit_state == EXIT_ZOMBIE)) { if ((tsk == NULL) || (tsk->exit_state == EXIT_ZOMBIE)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment