Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / mtd / maps / cfi_flagadm.c
index f72e4f8..fd0f0d3 100644 (file)
@@ -1,8 +1,8 @@
 /*
  *  Copyright © 2001 Flaga hf. Medical Devices, Kári Davíðsson <kd@flaga.is>
  *
- *  $Id: cfi_flagadm.c,v 1.14 2004/11/04 13:24:14 gleixner Exp $
- *  
+ *  $Id: cfi_flagadm.c,v 1.15 2005/11/07 11:14:26 gleixner Exp $
+ *
  *  This program is free software; you can redistribute  it and/or modify it
  *  under  the terms of  the GNU General  Public License as published by the
  *  Free Software Foundation;  either version 2 of the  License, or (at your
@@ -42,7 +42,7 @@
  */
 
 #define FLASH_PHYS_ADDR 0x40000000
-#define FLASH_SIZE 0x400000  
+#define FLASH_SIZE 0x400000
 
 #define FLASH_PARTITION0_ADDR 0x00000000
 #define FLASH_PARTITION0_SIZE 0x00020000
@@ -79,22 +79,22 @@ struct mtd_partition flagadm_parts[] = {
                .offset =       FLASH_PARTITION2_ADDR,
                .size =         FLASH_PARTITION2_SIZE
        },
-       {       
+       {
                .name =         "Persistant storage",
                .offset =       FLASH_PARTITION3_ADDR,
                .size =         FLASH_PARTITION3_SIZE
        }
 };
 
-#define PARTITION_COUNT (sizeof(flagadm_parts)/sizeof(struct mtd_partition))
+#define PARTITION_COUNT ARRAY_SIZE(flagadm_parts)
 
 static struct mtd_info *mymtd;
 
 int __init init_flagadm(void)
-{      
+{
        printk(KERN_NOTICE "FlagaDM flash device: %x at %x\n",
                        FLASH_SIZE, FLASH_PHYS_ADDR);
-       
+
        flagadm_map.phys = FLASH_PHYS_ADDR;
        flagadm_map.virt = ioremap(FLASH_PHYS_ADDR,
                                        FLASH_SIZE);