[PATCH] drivers/mtd: Use ARRAY_SIZE macro
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / maps / h720x-flash.c
index 3190948211011b16211950cba7e7dab9c4b89251..0667101ccbe1df53ef15e8baf88655b1bdf0496f 100644 (file)
@@ -59,7 +59,7 @@ static struct mtd_partition h720x_partitions[] = {
         }
 };
 
-#define NUM_PARTITIONS  (sizeof(h720x_partitions)/sizeof(h720x_partitions[0]))
+#define NUM_PARTITIONS ARRAY_SIZE(h720x_partitions)
 
 static int                   nr_mtd_parts;
 static struct mtd_partition *mtd_parts;