From 0299298860776ce952b7fac60ed9e77959ef4afe Mon Sep 17 00:00:00 2001 From: Ernesto Ramos Date: Wed, 28 Jul 2010 16:04:54 -0500 Subject: [PATCH] --- yaml --- r: 206041 b: refs/heads/master c: 8df327c3904d34527b89d4881bd3ce2966f0e07f h: refs/heads/master i: 206039: d3d2043c45c50a162a657fac6b7b9f91b47d9309 v: v3 --- [refs] | 2 +- trunk/drivers/staging/tidspbridge/pmgr/dspapi.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index eb7e3aa736ab..29c9264c6c30 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0624f52f77e11a6edfc48827a12190f874d572b8 +refs/heads/master: 8df327c3904d34527b89d4881bd3ce2966f0e07f diff --git a/trunk/drivers/staging/tidspbridge/pmgr/dspapi.c b/trunk/drivers/staging/tidspbridge/pmgr/dspapi.c index 6eda7c5324a8..f46aaf683e37 100644 --- a/trunk/drivers/staging/tidspbridge/pmgr/dspapi.c +++ b/trunk/drivers/staging/tidspbridge/pmgr/dspapi.c @@ -1059,7 +1059,7 @@ inline void find_node_handle(struct node_res_object **noderes, { rcu_read_lock(); *noderes = idr_find(((struct process_context *)pr_ctxt)->node_id, - (int)hnode); + (int)hnode - 1); rcu_read_unlock(); return; } @@ -1077,6 +1077,7 @@ u32 nodewrap_allocate(union trapped_args *args, void *pr_ctxt) u8 *pargs = NULL; struct dsp_nodeattrin proc_attr_in, *attr_in = NULL; struct node_res_object *node_res; + int nodeid; /* Optional argument */ if (psize) { @@ -1112,7 +1113,8 @@ u32 nodewrap_allocate(union trapped_args *args, void *pr_ctxt) attr_in, &node_res, pr_ctxt); } if (!status) { - CP_TO_USR(args->args_node_allocate.ph_node, &node_res->id, + nodeid = node_res->id + 1; + CP_TO_USR(args->args_node_allocate.ph_node, &nodeid, status, 1); if (status) { status = -EFAULT;