diff mbox

[RFC,1/13] DSPBRIDGE: Cleanup custom error code (DSP_EDIRECTION -> -EPERM)

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

Commit Message

Hebbar, Shivananda April 15, 2010, 9:16 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h b/arch/arm/plat-omap/include/dspbridge/errbase.h
index a9ecb71..8a0e48c 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -79,9 +79,6 @@ 
 /* A failure occurred during a delete operation */
 #define DSP_EDELETE                 (DSP_EBASE + 5)
 
-/* The specified direction is invalid */
-#define DSP_EDIRECTION              (DSP_EBASE + 6)
-
 /* A stream has been issued the maximum number of buffers allowed in the
  * stream at once ;  buffers must be reclaimed from the stream before any
  * more can be issued. */
diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h b/arch/arm/plat-omap/include/dspbridge/strm.h
index f53d66b..fd27da2 100644
--- a/arch/arm/plat-omap/include/dspbridge/strm.h
+++ b/arch/arm/plat-omap/include/dspbridge/strm.h
@@ -259,7 +259,7 @@  extern dsp_status strm_issue(struct strm_object *hStrm, IN u8 * pbuf,
  *  Returns:
  *      DSP_SOK:        Success.
  *      -EFAULT:    Invalid hnode.
- *      DSP_EDIRECTION: Invalid dir.
+ *      -EPERM: Invalid dir.
  *      -EINVAL:     Invalid index.
  *      -EPERM:  hnode is not a task or DAIS socket node.
  *      DSP_EFAIL:      Unable to open stream.
diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c
index 45a15b4..10d86ca 100644
--- a/drivers/dsp/bridge/rmgr/strm.c
+++ b/drivers/dsp/bridge/rmgr/strm.c
@@ -495,7 +495,7 @@  dsp_status strm_open(struct node_object *hnode, u32 dir, u32 index,
 	DBC_REQUIRE(pattr != NULL);
 	*phStrm = NULL;
 	if (dir != DSP_TONODE && dir != DSP_FROMNODE) {
-		status = DSP_EDIRECTION;
+		status = -EPERM;
 	} else {
 		/* Get the channel id from the node (set in node_connect()) */
 		status = node_get_channel_id(hnode, dir, index, &ul_chnl_id);
@@ -613,7 +613,7 @@  func_cont:
 	DBC_ENSURE((DSP_SUCCEEDED(status) &&
 		    MEM_IS_VALID_HANDLE((*phStrm), STRM_SIGNATURE)) ||
 		   (*phStrm == NULL && (status == -EFAULT ||
-					status == DSP_EDIRECTION
+					status == -EPERM
 					|| status == -EINVAL
 					|| status == DSP_EFAIL)));