Avoid calling multiple times to SERVICES_[Init|Exit] functions,
these should be called once at probe and exit respectively.

Signed-off-by: Omar Ramirez Luna <omar.rami...@ti.com>
---
 drivers/dsp/bridge/pmgr/wcd.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index 962cac6..2afe222 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -302,7 +302,6 @@ void WCD_Exit(void)
                MGR_Exit();
                RMM_exit();
                DRV_Exit();
-               SERVICES_Exit();
        }
        DBC_Ensure(WCD_cRefs >= 0);
 }
@@ -315,12 +314,10 @@ void WCD_Exit(void)
 bool WCD_Init(void)
 {
        bool fInit = true;
-       bool fDRV, fDEV, fCOD, fSERVICES, fCHNL, fMSG, fIO;
+       bool fDRV, fDEV, fCOD, fCHNL, fMSG, fIO;
        bool fMGR, fPROC, fNODE, fDISP, fNTFY, fSTRM, fRMM;
 
        if (WCD_cRefs == 0) {
-               /* initialize all SERVICES modules */
-               fSERVICES = SERVICES_Init();
                /* initialize debugging module */
                DBC_Assert(!WCD_debugMask.flags);
                GT_create(&WCD_debugMask, "CD");    /* CD for class driver */
@@ -338,13 +335,10 @@ bool WCD_Init(void)
                fIO = IO_Init();
                fDEV = DEV_Init();
                fCOD = COD_Init();
-               fInit = fSERVICES && fDRV && fDEV && fCHNL && fCOD &&
+               fInit = fDRV && fDEV && fCHNL && fCOD &&
                        fMSG && fIO;
                fInit = fInit && fMGR && fPROC && fRMM;
                if (!fInit) {
-                       if (fSERVICES)
-                               SERVICES_Exit();
-
                        if (fDRV)
                                DRV_Exit();
 
-- 
1.6.2.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