[PATCH] drivers/mtd: Use ARRAY_SIZE macro
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / maps / uclinux.c
index 79d92808b766fea1f006faedb5fb0d914d712238..f7264dc2ac9bc0dab0c9c62e904f28e380d0dfdd 100644 (file)
@@ -37,7 +37,7 @@ struct mtd_partition uclinux_romfs[] = {
        { .name = "ROMfs" }
 };
 
-#define        NUM_PARTITIONS  (sizeof(uclinux_romfs) / sizeof(uclinux_romfs[0]))
+#define        NUM_PARTITIONS  ARRAY_SIZE(uclinux_romfs)
 
 /****************************************************************************/