Skip to contentSkip to conversation

dspbridge: relocate MEM_ExtPhysPoolRelease() call

PATCH New Andy Shevchenko 1 participant 1 message Sep 3, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dspbridge: relocate MEM_ExtPhysPoolRelease() call

From: Andy Shevchenko <[email protected]>

It's more logical to have calls of symmetric functions at single place.

---
 arch/arm/plat-omap/include/dspbridge/mem.h |    5 +++++
 drivers/dsp/bridge/rmgr/drv_interface.c    |    2 ++
 drivers/dsp/bridge/services/mem.c          |    4 ++--
 3 files changed, 9 insertions(+), 2 deletions(-)
arch/arm/plat-omap/include/dspbridge/mem.h +5 -0
index 4e43f21..b47a6d4 100644
@@ -354,4 +354,9 @@
 	extern void MEM_ExtPhysPoolInit(IN u32 poolPhysBase,
 					IN u32 poolSize);
 
+/*
+ *  ======== MEM_ExtPhysPoolRelease ========
+ */
+	extern void MEM_ExtPhysPoolRelease(void);
+
 #endif				/* MEM_ */
drivers/dsp/bridge/rmgr/drv_interface.c +2 -0
index 08b5cde..e83ba3b 100644
@@ -503,6 +503,8 @@ static int __devexit omap34xx_bridge_remove(struct platform_device *pdev)
 	clk_handle = NULL;
 
 func_cont:
+	MEM_ExtPhysPoolRelease();
+
 	SERVICES_Exit();
 	GT_exit();
 
drivers/dsp/bridge/services/mem.c +2 -2
index 22f382b..5836bae 100644
@@ -30,6 +30,7 @@
  *      MEM_FreePhysMem
  *      MEM_Init
  *      MEM_ExtPhysPoolInit
+ *      MEM_ExtPhysPoolRelease
  *
  *! Revision History:
  *! =================
@@ -199,7 +200,7 @@ void MEM_ExtPhysPoolInit(u32 poolPhysBase, u32 poolSize)
 	}
 }
 
-static void MEM_ExtPhysPoolRelease(void)
+void MEM_ExtPhysPoolRelease(void)
 {
 	GT_0trace(MEM_debugMask, GT_1CLASS,
 		  "Releasing External memory pool \n");
@@ -460,7 +461,6 @@ void MEM_Exit(void)
 		MEM_Check();
 
 #endif
-	MEM_ExtPhysPoolRelease();
 	DBC_Ensure(cRefs >= 0);
 }
 
Signature · 1 line
1.5.6.5