diff options
author | Ernesto Ramos | 2010-07-28 23:04:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2010-08-03 02:11:02 +0200 |
commit | 0624f52f77e11a6edfc48827a12190f874d572b8 (patch) | |
tree | f937621ed5b31f83af7ac6f23b4340c672c2a74a /drivers/staging/tidspbridge/include/dspbridge/drv.h | |
parent | staging: ti dspbridge: avoid possible NULL dereference panic (diff) | |
download | kernel-qcow2-linux-0624f52f77e11a6edfc48827a12190f874d572b8.tar.gz kernel-qcow2-linux-0624f52f77e11a6edfc48827a12190f874d572b8.tar.xz kernel-qcow2-linux-0624f52f77e11a6edfc48827a12190f874d572b8.zip |
staging: ti dspbridge: use node id instead of kernel address
Use idr kernel library to send/receive node ids to the
user instead of kernel address.
This id will be use to access the node handles at the
kernel side, if id does not match to any handle
error -EFAULT is returned.
Signed-off-by: Ernesto Ramos <ernesto@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/tidspbridge/include/dspbridge/drv.h')
-rw-r--r-- | drivers/staging/tidspbridge/include/dspbridge/drv.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h index 28541f7f07ef..0b36a11820b5 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/drv.h +++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h @@ -24,6 +24,7 @@ #include <dspbridge/devdefs.h> #include <dspbridge/drvdefs.h> +#include <linux/idr.h> #define DRV_ASSIGN 1 #define DRV_RELEASE 0 @@ -81,7 +82,7 @@ struct node_res_object { s32 node_allocated; /* Node status */ s32 heap_allocated; /* Heap status */ s32 streams_allocated; /* Streams status */ - struct node_res_object *next; + int id; }; /* used to cache dma mapping information */ @@ -158,8 +159,7 @@ struct process_context { void *hprocessor; /* DSP Node resources */ - struct node_res_object *node_list; - struct mutex node_mutex; + struct idr *node_id; /* DMM mapped memory resources */ struct list_head dmm_map_list; |