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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 35bb007415ef78a380edfb4b79729626473eff3b Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar <x0hebbar@xxxxxx>
Date: Fri, 9 Apr 2010 10:59:06 -0500
Subject: [PATCH] DSPPBRIDGE: Cleanup custom error code (DSP_EFREAD -> -EBADF)

This patch replaces DSP_EFREAD with -EBADF

Signed-off-by: Shivananda Hebbar <x0hebbar@xxxxxx>
---
 arch/arm/plat-omap/include/dspbridge/dblldefs.h |    4 ++--
 arch/arm/plat-omap/include/dspbridge/errbase.h  |    3 ---
 drivers/dsp/bridge/pmgr/cod.c                   |    2 +-
 drivers/dsp/bridge/pmgr/dbll.c                  |    2 +-
 4 files changed, 4 insertions(+), 7 deletions(-)

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:
-- 
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux