]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Enable OneNAND driver to build as a module
authorKevin Hilman <khilman@mvista.com>
Fri, 1 Feb 2008 23:17:55 +0000 (15:17 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 5 Feb 2008 00:27:07 +0000 (16:27 -0800)
Enable OneNAND driver to build as a module, which requires exporting
GPMC request/free functions it depends on.

Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/gpmc.c
drivers/mtd/onenand/omap2.c

index 2b0e07dc5f98d76e0090001b74038402f08d341d..da3cf90d9617f1a1a08299d7f8baad2766cfea12 100644 (file)
@@ -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)
 {
index fe831a84e0cb48b5e1f1e39007fa25d0b20ecb5f..ba83900807ad06bab05f2529cf7ebced2d2d3c18 100644 (file)
@@ -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@nokia.com>");
 MODULE_DESCRIPTION("Glue layer for OneNAND flash on OMAP2");