mtd: physmap_of: Correct the size argument to kzalloc
[safe/jmp/linux-2.6] / drivers / mtd / maps / dilnetpc.c
index efb2216..0713e3a 100644 (file)
@@ -14,8 +14,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *
- * $Id: dilnetpc.c,v 1.20 2005/11/07 11:14:26 gleixner Exp $
- *
  * The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems
  * featuring the AMD Elan SC410 processor. There are two variants of this
  * board: DNP/1486 and ADNP/1486. The DNP version has 2 megs of flash
@@ -25,7 +23,6 @@
  * and http://www.ssv-embedded.de/ssv/pc104/p170.htm
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -300,7 +297,7 @@ static struct mtd_partition partition_info[]=
        },
 };
 
-#define NUM_PARTITIONS (sizeof(partition_info)/sizeof(partition_info[0]))
+#define NUM_PARTITIONS ARRAY_SIZE(partition_info)
 
 static struct mtd_info *mymtd;
 static struct mtd_info *lowlvl_parts[NUM_PARTITIONS];
@@ -345,7 +342,7 @@ static struct mtd_partition higlvl_partition_info[]=
        },
 };
 
-#define NUM_HIGHLVL_PARTITIONS (sizeof(higlvl_partition_info)/sizeof(partition_info[0]))
+#define NUM_HIGHLVL_PARTITIONS ARRAY_SIZE(higlvl_partition_info)
 
 
 static int dnp_adnp_probe(void)
@@ -403,8 +400,8 @@ static int __init init_dnpc(void)
                        ++higlvl_partition_info[i].name;
        }
 
-       printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n",
-               is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys);
+       printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%llx\n",
+               is_dnp ? "DNPC" : "ADNP", dnpc_map.size, (unsigned long long)dnpc_map.phys);
 
        dnpc_map.virt = ioremap_nocache(dnpc_map.phys, dnpc_map.size);