]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/maps/alchemy-flash.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/voyager-2.6
[linux-2.6-omap-h63xx.git] / drivers / mtd / maps / alchemy-flash.c
index 27fd2a3c3b600721264419a81110c440b665d25b..84fbe0e8c47e8be01bb68d82217ea9357221f54f 100644 (file)
@@ -1,13 +1,9 @@
 /*
  * Flash memory access on AMD Alchemy evaluation boards
- * 
- * $Id: alchemy-flash.c,v 1.1 2005/02/27 21:50:21 ppopov Exp $
  *
  * (C) 2003, 2004 Pete Popov <ppopov@embeddedalley.com>
- * 
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/types.h>
 
 #include <asm/io.h>
 
-#ifdef         DEBUG_RW
-#define        DBG(x...)       printk(x)
-#else
-#define        DBG(x...)       
-#endif
-
 #ifdef CONFIG_MIPS_PB1000
 #define BOARD_MAP_NAME "Pb1000 Flash"
 #define BOARD_FLASH_SIZE 0x00800000 /* 8MB */
@@ -126,8 +116,6 @@ static struct mtd_partition alchemy_partitions[] = {
         }
 };
 
-#define NB_OF(x)  (sizeof(x)/sizeof(x[0]))
-
 static struct mtd_info *mymtd;
 
 int __init alchemy_mtd_init(void)
@@ -136,7 +124,7 @@ int __init alchemy_mtd_init(void)
        int nb_parts = 0;
        unsigned long window_addr;
        unsigned long window_size;
-       
+
        /* Default flash buswidth */
        alchemy_map.bankwidth = BOARD_FLASH_WIDTH;
 
@@ -154,14 +142,14 @@ int __init alchemy_mtd_init(void)
         * Static partition definition selection
         */
        parts = alchemy_partitions;
-       nb_parts = NB_OF(alchemy_partitions);
+       nb_parts = ARRAY_SIZE(alchemy_partitions);
        alchemy_map.size = window_size;
 
        /*
         * Now let's probe for the actual flash.  Do it here since
         * specific machine settings might have been set above.
         */
-       printk(KERN_NOTICE BOARD_MAP_NAME ": probing %d-bit flash bus\n", 
+       printk(KERN_NOTICE BOARD_MAP_NAME ": probing %d-bit flash bus\n",
                        alchemy_map.bankwidth*8);
        alchemy_map.virt = ioremap(window_addr, window_size);
        mymtd = do_map_probe("cfi_probe", &alchemy_map);