From mboxrd@z Thu Jan 1 00:00:00 1970 From: Omar Ramirez Luna Subject: [PATCH 1/5] DSPBRIDGE: Avoid multiple calls to SERVICES_[Init|Exit] Date: Fri, 22 Jan 2010 21:33:20 -0600 Message-ID: <1264217604-8021-2-git-send-email-omar.ramirez@ti.com> References: <1264217604-8021-1-git-send-email-omar.ramirez@ti.com> Return-path: Received: from bear.ext.ti.com ([192.94.94.41]:49023 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753986Ab0AWDXB (ORCPT ); Fri, 22 Jan 2010 22:23:01 -0500 In-Reply-To: <1264217604-8021-1-git-send-email-omar.ramirez@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: linux-omap Cc: Ameya Palande , Hiroshi Doyu , Felipe Contreras , Nishanth Menon , Omar Ramirez Luna 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 --- 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