[PATCH] ARM: OMAP: Enable OneNAND driver to build as a module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Enable OneNAND driver to build as a module, which requires exporting
GPMC request/free functions it depends on.

Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxx>
---
 arch/arm/mach-omap2/gpmc.c  |    3 +++
 drivers/mtd/onenand/omap2.c |    7 ++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index e0983cb..cdf27fc 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -15,6 +15,7 @@
 #include <linux/clk.h>
 #include <linux/ioport.h>
 #include <linux/spinlock.h>
+#include <linux/module.h>
 
 #include <asm/io.h>
 #include <asm/mach-types.h>
@@ -362,6 +363,7 @@ out:
 	spin_unlock(&gpmc_mem_lock);
 	return r;
 }
+EXPORT_SYMBOL(gpmc_cs_request);
 
 void gpmc_cs_free(int cs)
 {
@@ -377,6 +379,7 @@ void gpmc_cs_free(int cs)
 	gpmc_cs_set_reserved(cs, 0);
 	spin_unlock(&gpmc_mem_lock);
 }
+EXPORT_SYMBOL(gpmc_cs_free);
 
 void __init gpmc_mem_init(void)
 {
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index fe831a8..ba83900 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -47,6 +47,8 @@
 
 #include <asm/arch/board.h>
 
+#define DRIVER_NAME "omap2-onenand"
+
 #define ONENAND_IO_SIZE		SZ_128K
 #define ONENAND_BUFRAM_SIZE	(1024 * 5)
 
@@ -530,13 +532,11 @@ static struct platform_driver omap2_onenand_driver = {
 	.remove		= omap2_onenand_remove,
 	.shutdown	= omap2_onenand_shutdown,
 	.driver		= {
-		.name	= "omap2-onenand",
+		.name	= DRIVER_NAME,
 		.owner  = THIS_MODULE,
 	},
 };
 
-MODULE_ALIAS(DRIVER_NAME);
-
 static int __init omap2_onenand_init(void)
 {
 	printk(KERN_INFO "OMAP2 OneNAND driver initializing\n");
@@ -551,6 +551,7 @@ static void __exit omap2_onenand_exit(void)
 module_init(omap2_onenand_init);
 module_exit(omap2_onenand_exit);
 
+MODULE_ALIAS(DRIVER_NAME);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Jarkko Lavinen <jarkko.lavinen@xxxxxxxxx>");
 MODULE_DESCRIPTION("Glue layer for OneNAND flash on OMAP2");
-- 
1.5.3.7

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux