[PATCH] drivers/mtd: Use ARRAY_SIZE macro
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / nand / au1550nd.c
index 201e1362da14748a493dea2acd719c72fd750e83..bde3550910a2e12626b7255e23a92982776a8668 100644 (file)
@@ -55,8 +55,6 @@ static const struct mtd_partition partition_info[] = {
                .size   =    MTDPART_SIZ_FULL
        }
 };
-#define NB_OF(x)  (sizeof(x)/sizeof(x[0]))
-
 
 /**
  * au_read_byte -  read one byte from the chip
@@ -462,7 +460,7 @@ int __init au1xxx_nand_init (void)
        }
 
        /* Register the partitions */
-       add_mtd_partitions(au1550_mtd, partition_info, NB_OF(partition_info));
+       add_mtd_partitions(au1550_mtd, partition_info, ARRAY_SIZE(partition_info));
 
        return 0;