[MTD] Make init_redwood_flash function static
[safe/jmp/linux-2.6] / drivers / mtd / maps / h720x-flash.c
index c738281..72c724f 100644 (file)
@@ -1,14 +1,11 @@
 /*
- * Flash memory access on Hynix GMS30C7201/HMS30C7202 based 
+ * Flash memory access on Hynix GMS30C7201/HMS30C7202 based
  * evaluation boards
- * 
- * $Id: h720x-flash.c,v 1.11 2004/11/04 13:24:14 gleixner Exp $
  *
  * (C) 2002 Jungjun Kim <jungjun.kim@hynix.com>
- *     2003 Thomas Gleixner <tglx@linutronix.de>       
+ *     2003 Thomas Gleixner <tglx@linutronix.de>
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -19,7 +16,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/partitions.h>
-#include <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/io.h>
 
 static struct mtd_info *mymtd;
@@ -27,8 +24,8 @@ static struct mtd_info *mymtd;
 static struct map_info h720x_map = {
        .name =         "H720X",
        .bankwidth =    4,
-       .size =         FLASH_SIZE,
-       .phys =         FLASH_PHYS,
+       .size =         H720X_FLASH_SIZE,
+       .phys =         H720X_FLASH_PHYS,
 };
 
 static struct mtd_partition h720x_partitions[] = {
@@ -59,7 +56,7 @@ static struct mtd_partition h720x_partitions[] = {
         }
 };
 
-#define NUM_PARTITIONS  (sizeof(h720x_partitions)/sizeof(h720x_partitions[0]))
+#define NUM_PARTITIONS ARRAY_SIZE(h720x_partitions)
 
 static int                   nr_mtd_parts;
 static struct mtd_partition *mtd_parts;
@@ -68,12 +65,12 @@ static const char *probes[] = { "cmdlinepart", NULL };
 /*
  * Initialize FLASH support
  */
-int __init h720x_mtd_init(void)
+static int __init h720x_mtd_init(void)
 {
 
        char    *part_type = NULL;
-       
-       h720x_map.virt = ioremap(FLASH_PHYS, FLASH_SIZE);
+
+       h720x_map.virt = ioremap(h720x_map.phys, h720x_map.size);
 
        if (!h720x_map.virt) {
                printk(KERN_ERR "H720x-MTD: ioremap failed\n");
@@ -91,7 +88,7 @@ int __init h720x_mtd_init(void)
            h720x_map.bankwidth = 2;
            mymtd = do_map_probe("cfi_probe", &h720x_map);
        }
-           
+
        if (mymtd) {
                mymtd->owner = THIS_MODULE;
 
@@ -124,11 +121,11 @@ static void __exit h720x_mtd_cleanup(void)
                del_mtd_partitions(mymtd);
                map_destroy(mymtd);
        }
-       
+
        /* Free partition info, if commandline partition was used */
        if (mtd_parts && (mtd_parts != h720x_partitions))
                kfree (mtd_parts);
-       
+
        if (h720x_map.virt) {
                iounmap((void *)h720x_map.virt);
                h720x_map.virt = 0;