From 746a7aa9aa3e5e775b58e33c23d4c23bfcdc01d6 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Fri, 1 Feb 2008 15:17:55 -0800 Subject: [PATCH] ARM: OMAP: Enable OneNAND driver to build as a module Enable OneNAND driver to build as a module, which requires exporting GPMC request/free functions it depends on. Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren --- 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 2b0e07dc5f9..da3cf90d961 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -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 fe831a84e0c..ba83900807a 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -47,6 +47,8 @@ #include +#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 "); MODULE_DESCRIPTION("Glue layer for OneNAND flash on OMAP2"); -- 2.41.1