On 1/26/2010 7:46 PM, Guzman Lugo, Fernando wrote:


Hi,

-----Original Message-----
From: [email protected] [mailto:linux-omap-
[email protected]] On Behalf Of Ramirez Luna, Omar
Sent: Tuesday, January 26, 2010 6:57 PM
To: linux-omap
Cc: Ameya Palande; Hiroshi Doyu; Felipe Contreras; Menon, Nishanth; Ramirez
Luna, Omar
Subject: [PATCH v2 4/5] DSPBRIDGE: Remove multiple initializations of REG
module

REG module should be only initialized by services layer.

Signed-off-by: Omar Ramirez Luna<[email protected]>
---
drivers/dsp/bridge/rmgr/dbdcd.c |    9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/drivers/dsp/bridge/rmgr/dbdcd.c
b/drivers/dsp/bridge/rmgr/dbdcd.c
index cb244f4..caa57f1 100644
--- a/drivers/dsp/bridge/rmgr/dbdcd.c
+++ b/drivers/dsp/bridge/rmgr/dbdcd.c
@@ -350,7 +350,6 @@ void DCD_Exit(void)

        cRefs--;
        if (cRefs == 0) {
-               REG_Exit();
                COD_Exit();
        }

@@ -821,7 +820,6 @@ DSP_STATUS DCD_GetLibraryName(IN struct DCD_MANAGER
*hDcdMgr,
  */
bool DCD_Init(void)
{
-       bool fInitREG;
        bool fInitCOD;
        bool fInit = true;

@@ -833,18 +831,13 @@ bool DCD_Init(void)
        if (cRefs == 0) {
                /* Initialize required modules. */
                fInitCOD = COD_Init();
-               fInitREG = REG_Init();

-               if (!fInitCOD || !fInitREG) {
+               if (!fInitCOD) {
                        fInit = false;
                        GT_0trace(curTrace, GT_6CLASS, "DCD_Init failed\n");
                        /* Exit initialized modules. */
                        if (fInitCOD)
                                COD_Exit();
-
-                       if (fInitREG)
-                               REG_Exit();
-
                }
        }

Now DCD_Init() is only initializing COD module maybe you can remove DCD_Init 
and just call COD_Init(), if it is not good for consistency you can replace the 
function for something like this:

bool DCD_Init(void)
{
        return COD_Init();
}

All the other stuff are not needed.


Agree, but this should be a separate patch as this series only touch services layer init functions.

- omar

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

Reply via email to