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 / ocotea.c
index 6e559bc..a21fcd1 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/mtd/map.h>
 #include <linux/mtd/partitions.h>
 #include <linux/config.h>
-#include <linux/version.h>
 #include <asm/io.h>
 #include <asm/ibm44x.h>
 #include <platforms/4xx/ocotea.h>
@@ -59,8 +58,6 @@ static struct mtd_partition ocotea_large_partitions[] = {
        }
 };
 
-#define NB_OF(x)  (sizeof(x)/sizeof(x[0]))
-
 int __init init_ocotea(void)
 {
        u8 fpga0_reg;
@@ -98,7 +95,7 @@ int __init init_ocotea(void)
        if (flash) {
                flash->owner = THIS_MODULE;
                add_mtd_partitions(flash, ocotea_small_partitions,
-                                       NB_OF(ocotea_small_partitions));
+                                       ARRAY_SIZE(ocotea_small_partitions));
        } else {
                printk("map probe failed for flash\n");
                return -ENXIO;
@@ -119,7 +116,7 @@ int __init init_ocotea(void)
        if (flash) {
                flash->owner = THIS_MODULE;
                add_mtd_partitions(flash, ocotea_large_partitions,
-                                       NB_OF(ocotea_large_partitions));
+                                       ARRAY_SIZE(ocotea_large_partitions));
        } else {
                printk("map probe failed for flash\n");
                return -ENXIO;