From 243d96420d058e55824581e450ac1877005f2e82 Mon Sep 17 00:00:00 2001
From: Sylvain Munaut <tnt@246tNt.com>
Date: Sun, 13 May 2007 14:15:19 +0200
Subject: [PATCH 11/21] powerpc: BestComm, move the EXPORT_SYMBOL and use the _GPL version

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
 arch/powerpc/sysdev/bestcomm/bestcomm.c |   22 ++++++++++------------
 arch/powerpc/sysdev/bestcomm/sram.c     |   13 +++++--------
 2 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
index 0063a1e..589e37d 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -30,6 +30,7 @@
 
 
 struct bcom_engine *bcom = NULL;
+EXPORT_SYMBOL_GPL(bcom);	/* needed for inline functions */
 
 
 /* ======================================================================== */
@@ -87,6 +88,7 @@ bcom_dump_status(void)
 	BCOM_DPRINTK(" Status          = %08x\n", in_be32(&r->Status));
 	BCOM_DPRINTK(" PTDDebug        = %08x\n", in_be32(&r->PTDDebug));
 }
+EXPORT_SYMBOL_GPL(bcom_dump_status);
 
 void
 bcom_dump_task(int task)
@@ -119,6 +121,7 @@ bcom_dump_task(int task)
 	for (i=0; i<BCOM_MAX_VAR+BCOM_MAX_INC; i++)
 		printk(KERN_DEBUG "\t%p %08x\n", &p[i], p[i]);
 }
+EXPORT_SYMBOL_GPL(bcom_dump_task);
 
 void
 bcom_dump_bdring(struct bcom_task *tsk)
@@ -136,6 +139,7 @@ bcom_dump_bdring(struct bcom_task *tsk)
 				j, tsk->bd[i].data[j]);
 	}
 }
+EXPORT_SYMBOL_GPL(bcom_dump_bdring);
 
 
 /* Private API */
@@ -205,6 +209,7 @@ error:
 
 	return NULL;
 }
+EXPORT_SYMBOL_GPL(bcom_task_alloc);
 
 void
 bcom_task_release(struct bcom_task *tsk)
@@ -222,6 +227,7 @@ bcom_task_release(struct bcom_task *tsk)
 	kfree(tsk->cookie);
 	kfree(tsk);
 }
+EXPORT_SYMBOL_GPL(bcom_task_release);
 
 int
 bcom_load_image(int task, u32 *task_image)
@@ -286,6 +292,7 @@ bcom_load_image(int task, u32 *task_image)
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(bcom_load_image);
 
 void
 bcom_set_initiator(int task, int initiator)
@@ -314,6 +321,7 @@ bcom_set_initiator(int task, int initiator)
 		next_drd_has_initiator = !bcom_drd_is_extended(*desc);
 	}
 }
+EXPORT_SYMBOL_GPL(bcom_set_initiator);
 
 
 /* Public API */
@@ -323,12 +331,14 @@ bcom_enable(struct bcom_task *tsk)
 {
 	bcom_enable_task(tsk->tasknum);
 }
+EXPORT_SYMBOL_GPL(bcom_enable);
 
 void
 bcom_disable(struct bcom_task *tsk)
 {
 	bcom_disable_task(tsk->tasknum);
 }
+EXPORT_SYMBOL_GPL(bcom_disable);
 
 
 /* ======================================================================== */
@@ -586,15 +596,3 @@ MODULE_AUTHOR("Andrey Volkov <avolkov@varma-el.com>");
 MODULE_AUTHOR("Dale Farnsworth <dfarnsworth@mvista.com>");
 MODULE_LICENSE("GPL v2");
 
-
-EXPORT_SYMBOL(bcom);
-EXPORT_SYMBOL(bcom_dump_status);
-EXPORT_SYMBOL(bcom_dump_task);
-EXPORT_SYMBOL(bcom_dump_bdring);
-EXPORT_SYMBOL(bcom_task_alloc);
-EXPORT_SYMBOL(bcom_task_release);
-EXPORT_SYMBOL(bcom_load_image);
-EXPORT_SYMBOL(bcom_set_initiator);
-EXPORT_SYMBOL(bcom_enable);
-EXPORT_SYMBOL(bcom_disable);
-
diff --git a/arch/powerpc/sysdev/bestcomm/sram.c b/arch/powerpc/sysdev/bestcomm/sram.c
index 4f69127..a5094d6 100644
--- a/arch/powerpc/sysdev/bestcomm/sram.c
+++ b/arch/powerpc/sysdev/bestcomm/sram.c
@@ -27,6 +27,7 @@
 
 /* Struct keeping our 'state' */
 struct bcom_sram *bcom_sram = NULL;
+EXPORT_SYMBOL_GPL(bcom_sram);	/* needed for inline functions */
 
 
 /* ======================================================================== */
@@ -128,6 +129,7 @@ error_free:
 
 	return rv;
 }
+EXPORT_SYMBOL_GPL(bcom_sram_init);
 
 void bcom_sram_cleanup(void)
 {
@@ -140,6 +142,7 @@ void bcom_sram_cleanup(void)
 		bcom_sram = NULL;
 	}
 }
+EXPORT_SYMBOL_GPL(bcom_sram_cleanup);
 
 void* bcom_sram_alloc(int size, int align, phys_addr_t *phys)
 {
@@ -155,6 +158,7 @@ void* bcom_sram_alloc(int size, int align, phys_addr_t *phys)
 	*phys = bcom_sram->base_phys + offset;
 	return bcom_sram->base_virt + offset;
 }
+EXPORT_SYMBOL_GPL(bcom_sram_alloc);
 
 void bcom_sram_free(void *ptr)
 {
@@ -169,12 +173,5 @@ void bcom_sram_free(void *ptr)
 	rh_free(bcom_sram->rh, offset);
 	spin_unlock(&bcom_sram->lock);
 }
-
-
-EXPORT_SYMBOL(bcom_sram);
-
-EXPORT_SYMBOL(bcom_sram_init);
-EXPORT_SYMBOL(bcom_sram_cleanup);
-EXPORT_SYMBOL(bcom_sram_alloc);
-EXPORT_SYMBOL(bcom_sram_free);
+EXPORT_SYMBOL_GPL(bcom_sram_free);
 
-- 
1.5.1.2

