diff mbox

[RFC,4/13] DSPPBRIDGE: Cleanup custom error code (DSP_EFREAD -> -EBADF)

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

Commit Message

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

Patch

diff --git a/arch/arm/plat-omap/include/dspbridge/dblldefs.h b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
index 527d47e..5dd23fb 100644
--- a/arch/arm/plat-omap/include/dspbridge/dblldefs.h
+++ b/arch/arm/plat-omap/include/dspbridge/dblldefs.h
@@ -337,7 +337,7 @@  typedef bool(*dbll_init_fxn) (void);
  *      pulEntry        - Location to store program entry on output.
  *  Returns:
  *      DSP_SOK:        Success.
- *      DSP_EFREAD:     File read failed.
+ *      -EBADF:     File read failed.
  *      DSP_EFWRITE:    Write to target failed.
  *      DSP_EDYNLOAD:   Failure in dynamic loader library.
  *  Requires:
@@ -386,7 +386,7 @@  typedef dsp_status(*dbll_load_sect_fxn) (struct dbll_library_obj *lib,
  *      DSP_SOK:            Success.
  *      -ENOMEM:        Memory allocation failure.
  *      -EBADF:         File open failure.
- *      DSP_EFREAD:         File read failure.
+ *      -EBADF:         File read failure.
  *      DSP_ECORRUPTFILE:   Unable to determine target type.
  *  Requires:
  *      DBL initialized.
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 3f637dd..c9316ac 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -162,9 +162,6 @@ 
 /* Unable to find a named section in DSP executable */
 #define DSP_ENOSECT                 (DSP_EBASE + 0x32)
 
-/* Unable to read file */
-#define DSP_EFREAD                  (DSP_EBASE + 0x34)
-
 /* A non-existent memory segment identifier was specified */
 #define DSP_EOVERLAYMEMORY          (DSP_EBASE + 0x37)
 
diff --git a/drivers/dsp/bridge/pmgr/cod.c b/drivers/dsp/bridge/pmgr/cod.c
index b4b71fc..010e90c 100644
--- a/drivers/dsp/bridge/pmgr/cod.c
+++ b/drivers/dsp/bridge/pmgr/cod.c
@@ -149,7 +149,7 @@  static s32 cod_f_read(void __user *pbuffer, s32 size, s32 cCount,
 		set_fs(fs);
 
 		if (!dw_bytes_read)
-			return DSP_EFREAD;
+			return -EBADF;
 
 		return dw_bytes_read / size;
 	}
diff --git a/drivers/dsp/bridge/pmgr/dbll.c b/drivers/dsp/bridge/pmgr/dbll.c
index 5544029..e692b78 100644
--- a/drivers/dsp/bridge/pmgr/dbll.c
+++ b/drivers/dsp/bridge/pmgr/dbll.c
@@ -795,7 +795,7 @@  dsp_status dbll_read_sect(struct dbll_library_obj *lib, char *name,
 		status = DSP_EFAIL;
 	} else {
 		if (!dload_get_section(zl_lib->desc, sect, pContent))
-			status = DSP_EFREAD;
+			status = -EBADF;
 
 	}
 func_cont: