diff mbox

[6/8] DSPBRIDGE: typedef cleanup -DSP_HNODE

Message ID 19F8576C6E063C45BE387C64729E7394044A776237@dbde02.ent.ti.com (mailing list archive)
State Accepted
Delegated to:
Headers show

Commit Message

Hebbar, Shivananda Feb. 6, 2010, 1:23 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
index e3be0fc..472b62f 100644
--- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h
@@ -109,8 +109,6 @@ 
 /* Types defined for 'Bridge API */
 	typedef u32 DSP_STATUS;	/* API return code type         */
 
-	typedef HANDLE DSP_HNODE;	/* Handle to a DSP Node object  */
-
 /* Handy Macros */
 #define IsValidProcEvent(x) (((x) == 0) || (((x) & (DSP_PROCESSORSTATECHANGE | \
 				    DSP_PROCESSORATTACH | \
@@ -318,7 +316,7 @@ 
 		u32 cbStruct;
 		enum DSP_CONNECTTYPE lType;
 		u32 uThisNodeStreamIndex;
-		DSP_HNODE hConnectedNode;
+		void *hConnectedNode;
 		struct DSP_UUID uiConnectedNodeID;
 		u32 uConnectedNodeStreamIndex;
 	} ;
@@ -368,7 +366,7 @@ 
 		struct DSP_NDBPROPS nbNodeDatabaseProps;
 		u32 uExecutionPriority;
 		enum NODE_STATE nsExecutionState;
-		DSP_HNODE hDeviceOwner;
+		void *hDeviceOwner;
 		u32 uNumberStreams;
 		struct DSP_STREAMCONNECT scStreamConnection[16];
 		u32 uNodeEnv;
diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h b/arch/arm/plat-omap/include/dspbridge/drv.h
index c6d4626..b31c8e3 100644
--- a/arch/arm/plat-omap/include/dspbridge/drv.h
+++ b/arch/arm/plat-omap/include/dspbridge/drv.h
@@ -84,7 +84,7 @@ 
 
 /* New structure (member of process context) abstracts NODE resource info */
 struct NODE_RES_OBJECT {
-	DSP_HNODE       hNode;
+	void *hNode;
 	s32            nodeAllocated; /* Node status */
 	s32            heapAllocated; /* Heap status */
 	s32            streamsAllocated; /* Streams status */
diff --git a/arch/arm/plat-omap/include/dspbridge/node.h b/arch/arm/plat-omap/include/dspbridge/node.h
index 9f0110a..2a45fc0 100644
--- a/arch/arm/plat-omap/include/dspbridge/node.h
+++ b/arch/arm/plat-omap/include/dspbridge/node.h
@@ -308,7 +308,7 @@ 
  *        (*puAllocated == *puNumNodes)
  */
 	extern DSP_STATUS NODE_EnumNodes(struct NODE_MGR *hNodeMgr,
-					 IN DSP_HNODE *aNodeTab,
+					 void **aNodeTab,
 					 u32 uNodeTabSize,
 					 OUT u32 *puNumNodes,
 					 OUT u32 *puAllocated);
diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h b/arch/arm/plat-omap/include/dspbridge/proc.h
index bbb089e..d5edbd5 100644
--- a/arch/arm/plat-omap/include/dspbridge/proc.h
+++ b/arch/arm/plat-omap/include/dspbridge/proc.h
@@ -153,7 +153,7 @@ 
  *  Details:
  */
 	extern DSP_STATUS PROC_EnumNodes(void *hProcessor,
-					 IN DSP_HNODE *aNodeTab,
+					 void **aNodeTab,
 					 IN u32 uNodeTabSize,
 					 OUT u32 *puNumNodes,
 					 OUT u32 *puAllocated);
diff --git a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
index 4f5a274..eccda18 100644
--- a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
+++ b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h
@@ -79,7 +79,7 @@  union Trapped_Args {
 
 	struct {
 		void *hProcessor;
-		DSP_HNODE __user *aNodeTab;
+		void *__user *aNodeTab;
 		u32 uNodeTabSize;
 		u32 __user *puNumNodes;
 		u32 __user *puAllocated;
@@ -177,79 +177,79 @@  union Trapped_Args {
 		struct DSP_UUID __user *pNodeID;
 		struct DSP_CBDATA __user *pArgs;
 		struct DSP_NODEATTRIN __user *pAttrIn;
-		DSP_HNODE __user *phNode;
+		void *__user *phNode;
 	} ARGS_NODE_ALLOCATE;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 		u32 uSize;
 		struct DSP_BUFFERATTR __user *pAttr;
 		u8 *__user *pBuffer;
 	} ARGS_NODE_ALLOCMSGBUF;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 		s32 iPriority;
 	} ARGS_NODE_CHANGEPRIORITY;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 		u32 uStream;
-		DSP_HNODE hOtherNode;
+		void *hOtherNode;
 		u32 uOtherStream;
 		struct DSP_STRMATTR __user *pAttrs;
 		struct DSP_CBDATA __user *pConnParam;
 	} ARGS_NODE_CONNECT;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 	} ARGS_NODE_CREATE;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 	} ARGS_NODE_DELETE;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 		struct DSP_BUFFERATTR __user *pAttr;
 		u8 *pBuffer;
 	} ARGS_NODE_FREEMSGBUF;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 		struct DSP_NODEATTR __user *pAttr;
 		u32 uAttrSize;
 	} ARGS_NODE_GETATTR;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 		struct DSP_MSG __user *pMessage;
 		u32 uTimeout;
 	} ARGS_NODE_GETMESSAGE;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 	} ARGS_NODE_PAUSE;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 		struct DSP_MSG __user *pMessage;
 		u32 uTimeout;
 	} ARGS_NODE_PUTMESSAGE;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 		u32 uEventMask;
 		u32 uNotifyType;
 		struct DSP_NOTIFICATION __user *hNotification;
 	} ARGS_NODE_REGISTERNOTIFY;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 	} ARGS_NODE_RUN;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 		DSP_STATUS __user *pStatus;
 	} ARGS_NODE_TERMINATE;
 
@@ -303,7 +303,7 @@  union Trapped_Args {
 	} ARGS_STRM_ISSUE;
 
 	struct {
-		DSP_HNODE hNode;
+		void *hNode;
 		u32 uDirection;
 		u32 uIndex;
 		struct STRM_ATTR __user *pAttrIn;
diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index fa4ba47..f31cc4b 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -740,7 +740,7 @@  u32 __deprecated PROCWRAP_Detach(union Trapped_Args *args, void *pr_ctxt)
 u32 PROCWRAP_EnumNode_Info(union Trapped_Args *args, void *pr_ctxt)
 {
 	DSP_STATUS status;
-	DSP_HNODE aNodeTab[MAX_NODES];
+	void *aNodeTab[MAX_NODES];
 	u32 uNumNodes;
 	u32 uAllocated;
 
diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c
index aa2a687..812099c 100644
--- a/drivers/dsp/bridge/rmgr/node.c
+++ b/drivers/dsp/bridge/rmgr/node.c
@@ -218,7 +218,7 @@  struct NODE_OBJECT {
 	s32 nExitStatus;	/* execute function return status */
 
 	/* Information needed for NODE_GetAttr() */
-	DSP_HNODE hDeviceOwner;	/* If dev node, task that owns it */
+	void *hDeviceOwner;	/* If dev node, task that owns it */
 	u32 uNumGPPInputs;	/* Current # of from GPP streams */
 	u32 uNumGPPOutputs;	/* Current # of to GPP streams */
 	/* Current stream connections */
@@ -1690,7 +1690,7 @@  DSP_STATUS NODE_DeleteMgr(struct NODE_MGR *hNodeMgr)
  *  Purpose:
  *      Enumerate currently allocated nodes.
  */
-DSP_STATUS NODE_EnumNodes(struct NODE_MGR *hNodeMgr, IN DSP_HNODE *aNodeTab,
+DSP_STATUS NODE_EnumNodes(struct NODE_MGR *hNodeMgr, void **aNodeTab,
 			 u32 uNodeTabSize, OUT u32 *puNumNodes,
 			 OUT u32 *puAllocated)
 {
diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index ae2364a..439dbe8 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -532,7 +532,7 @@  DSP_STATUS PROC_Detach(struct PROCESS_CONTEXT *pr_ctxt)
  *      Enumerate and get configuration information about nodes allocated
  *      on a DSP processor.
  */
-DSP_STATUS PROC_EnumNodes(void *hProcessor, OUT DSP_HNODE *aNodeTab,
+DSP_STATUS PROC_EnumNodes(void *hProcessor, void **aNodeTab,
 		IN u32 uNodeTabSize, OUT u32 *puNumNodes,
 		OUT u32 *puAllocated)
 {
@@ -1534,7 +1534,7 @@  DSP_STATUS PROC_Stop(void *hProcessor)
 	struct PROC_OBJECT *pProcObject = (struct PROC_OBJECT *)hProcessor;
 	struct MSG_MGR *hMsgMgr;
 	struct NODE_MGR *hNodeMgr;
-	DSP_HNODE hNode;
+	void *hNode;
 	u32 uNodeTabSize = 1;
 	u32 uNumNodes = 0;
 	u32 uNodesAllocated = 0;