]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/maps/alchemy-flash.c
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
[linux-2.6-omap-h63xx.git] / drivers / mtd / maps / alchemy-flash.c
index 27fd2a3c3b600721264419a81110c440b665d25b..7fc8097e41d224bbf690f9b72d7fc109495b68a3 100644 (file)
@@ -1,13 +1,12 @@
 /*
  * Flash memory access on AMD Alchemy evaluation boards
- * 
- * $Id: alchemy-flash.c,v 1.1 2005/02/27 21:50:21 ppopov Exp $
+ *
+ * $Id: alchemy-flash.c,v 1.2 2005/11/07 11:14:26 gleixner 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>
@@ -22,7 +21,7 @@
 #ifdef         DEBUG_RW
 #define        DBG(x...)       printk(x)
 #else
-#define        DBG(x...)       
+#define        DBG(x...)
 #endif
 
 #ifdef CONFIG_MIPS_PB1000
@@ -126,8 +125,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 +133,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 +151,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);