>From 1daa5435abd871e8451c93fbd1d2de136566ac7e Mon Sep 17 00:00:00 2001
From: Shivananda Hebbar <x0heb...@ti.com>
Date: Fri, 9 Apr 2010 11:28:53 -0500
Subject: [PATCH] DSPBRIDGE: Cleanup custom error code (CFG_E_INVALIDHDEVNODE -> 
-EFAULT)

This patch replaces CFG_E_INVALIDHDEVNODE with -EFAULT.

Signed-off-by: Shivananda Hebbar <x0heb...@ti.com>
---
 arch/arm/plat-omap/include/dspbridge/cfg.h     |   16 ++++++++--------
 arch/arm/plat-omap/include/dspbridge/errbase.h |    3 ---
 drivers/dsp/bridge/services/cfg.c              |   14 +++++++-------
 3 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/cfg.h 
b/arch/arm/plat-omap/include/dspbridge/cfg.h
index faeb87c..635ffbc 100644
--- a/arch/arm/plat-omap/include/dspbridge/cfg.h
+++ b/arch/arm/plat-omap/include/dspbridge/cfg.h
@@ -43,7 +43,7 @@ extern void cfg_exit(void);
  *      pdwAutoStart:   Ptr to location for 32 bit autostart mask.
  *  Returns:
  *      DSP_SOK:                Success.
- *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *      -EFAULT:  dev_node_obj is invalid.
  *      CFG_E_RESOURCENOTAVAIL: Unable to retreive resource.
  *  Requires:
  *      CFG initialized.
@@ -82,7 +82,7 @@ extern dsp_status cfg_get_cd_version(OUT u32 *pdwVersion);
  *      pdwValue:       Ptr to location to store the value.
  *  Returns:
  *      DSP_SOK:                Success.
- *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *      -EFAULT:  dev_node_obj is invalid.
  *      -EFAULT:   phDevObject is invalid.
  *      CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
@@ -103,7 +103,7 @@ extern dsp_status cfg_get_dev_object(IN struct cfg_devnode 
*dev_node_obj,
  *      pDSPResTable:   Ptr to a location to store the DSP resource table.
  *  Returns:
  *      DSP_SOK:                On success.
- *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *      -EFAULT:  dev_node_obj is invalid.
  *      CFG_E_RESOURCENOTAVAIL: The DSP Resource information is not
  *                              available
  *  Requires:
@@ -125,7 +125,7 @@ extern dsp_status cfg_get_dsp_resources(IN struct 
cfg_devnode *dev_node_obj,
  *      pstrExecFile:   Ptr to character buf to hold ExecFile.
  *  Returns:
  *      DSP_SOK:                Success.
- *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *      -EFAULT:  dev_node_obj is invalid.
  *      -EFAULT:   pstrExecFile is invalid.
  *      CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
@@ -148,7 +148,7 @@ extern dsp_status cfg_get_exec_file(IN struct cfg_devnode 
*dev_node_obj,
  *  Returns:
  *      DSP_SOK:                On success.
  *      -EFAULT:   pHostResTable is invalid.
- *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *      -EFAULT:  dev_node_obj is invalid.
  *      CFG_E_RESOURCENOTAVAIL: The resource is not available.
  *  Requires:
  *      CFG initialized.
@@ -203,7 +203,7 @@ extern void cfg_get_perf_value(OUT bool *pfEnablePerf);
  *      pWMDFileName:   Ptr to a character buffer to hold the WMD filename.
  *  Returns:
  *      DSP_SOK:                On success.
- *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *      -EFAULT:  dev_node_obj is invalid.
  *      CFG_E_RESOURCENOTAVAIL: The filename is not available.
  *  Requires:
  *      CFG initialized.
@@ -227,7 +227,7 @@ extern dsp_status cfg_get_wmd_file_name(IN struct 
cfg_devnode *dev_node_obj,
  *  Returns:
  *      DSP_SOK:                Success.
  *      -EFAULT:   pstrZLFileName is invalid.
- *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *      -EFAULT:  dev_node_obj is invalid.
  *      CFG_E_RESOURCENOTAVAIL: couldn't find the ZLFileName.
  *  Requires:
  *      CFG initialized.
@@ -261,7 +261,7 @@ extern bool cfg_init(void);
  *      dwValue:    Arbitrary value to store.
  *  Returns:
  *      DSP_SOK:                Success.
- *      CFG_E_INVALIDHDEVNODE:  dev_node_obj is invalid.
+ *      -EFAULT:  dev_node_obj is invalid.
  *      DSP_EFAIL:              Internal Error.
  *  Requires:
  *      CFG initialized.
diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h 
b/arch/arm/plat-omap/include/dspbridge/errbase.h
index 660deb6..1c3da08 100644
--- a/arch/arm/plat-omap/include/dspbridge/errbase.h
+++ b/arch/arm/plat-omap/include/dspbridge/errbase.h
@@ -216,9 +216,6 @@
 /* FAILURE Codes : CFG */
 #define CFG_EBASE                   (DSP_COMP_EBASE + 0x200)
 
-/* Invalid device node handle passed into a configuration module function. */
-#define CFG_E_INVALIDHDEVNODE       (CFG_EBASE + 0x01)
-
 /* Unable to retrieve resource information from the registry. */
 #define CFG_E_RESOURCENOTAVAIL      (CFG_EBASE + 0x02)
 
diff --git a/drivers/dsp/bridge/services/cfg.c 
b/drivers/dsp/bridge/services/cfg.c
index ad02875..747ae0e 100644
--- a/drivers/dsp/bridge/services/cfg.c
+++ b/drivers/dsp/bridge/services/cfg.c
@@ -58,7 +58,7 @@ dsp_status cfg_get_auto_start(struct cfg_devnode 
*dev_node_obj,
 
        dw_buf_size = sizeof(*pdwAutoStart);
        if (!dev_node_obj)
-               status = CFG_E_INVALIDHDEVNODE;
+               status = -EFAULT;
        if (!pdwAutoStart)
                status = -EFAULT;
        if (DSP_SUCCEEDED(status)) {
@@ -86,10 +86,10 @@ dsp_status cfg_get_dev_object(struct cfg_devnode 
*dev_node_obj,
        u32 dw_buf_size;
 
        if (!dev_node_obj)
-               status = CFG_E_INVALIDHDEVNODE;
+               status = -EFAULT;
 
        if (!pdwValue)
-               status = CFG_E_INVALIDHDEVNODE;
+               status = -EFAULT;
 
        dw_buf_size = sizeof(pdwValue);
        if (DSP_SUCCEEDED(status)) {
@@ -120,7 +120,7 @@ dsp_status cfg_get_dsp_resources(struct cfg_devnode 
*dev_node_obj,
        u32 dw_res_size;
 
        if (!dev_node_obj) {
-               status = CFG_E_INVALIDHDEVNODE;
+               status = -EFAULT;
        } else if (!pDSPResTable) {
                status = -EFAULT;
        } else {
@@ -152,7 +152,7 @@ dsp_status cfg_get_exec_file(struct cfg_devnode 
*dev_node_obj, u32 ul_buf_size,
        u32 exec_size = ul_buf_size;
 
        if (!dev_node_obj)
-               status = CFG_E_INVALIDHDEVNODE;
+               status = -EFAULT;
        else if (!pstrExecFile)
                status = -EFAULT;
 
@@ -185,7 +185,7 @@ dsp_status cfg_get_host_resources(struct cfg_devnode 
*dev_node_obj,
        u32 dw_buf_size;
 
        if (!dev_node_obj)
-               status = CFG_E_INVALIDHDEVNODE;
+               status = -EFAULT;
 
        if (!pHostResTable)
                status = -EFAULT;
@@ -274,7 +274,7 @@ dsp_status cfg_set_dev_object(struct cfg_devnode 
*dev_node_obj, u32 dwValue)
        u32 dw_buff_size;
 
        if (!dev_node_obj)
-               status = CFG_E_INVALIDHDEVNODE;
+               status = -EFAULT;
 
        dw_buff_size = sizeof(dwValue);
        if (DSP_SUCCEEDED(status)) {
-- 
1.6.0.4

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

Reply via email to