summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/alchemy-flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/alchemy-flash.c')
-rw-r--r--drivers/mtd/maps/alchemy-flash.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/maps/alchemy-flash.c b/drivers/mtd/maps/alchemy-flash.c
index a57791a..b933a2a 100644
--- a/drivers/mtd/maps/alchemy-flash.c
+++ b/drivers/mtd/maps/alchemy-flash.c
@@ -126,8 +126,6 @@ static struct mtd_partition alchemy_partitions[] = {
}
};
-#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
-
static struct mtd_info *mymtd;
int __init alchemy_mtd_init(void)
@@ -154,7 +152,7 @@ int __init alchemy_mtd_init(void)
* Static partition definition selection
*/
parts = alchemy_partitions;
- nb_parts = NB_OF(alchemy_partitions);
+ nb_parts = ARRAY_SIZE(alchemy_partitions);
alchemy_map.size = window_size;
/*
OpenPOWER on IntegriCloud