X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fmaps%2Falchemy-flash.c;fp=drivers%2Fmtd%2Fmaps%2Falchemy-flash.c;h=a57791a6ce402a754e32f6dec0b40523ffe11eda;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=7fc8097e41d224bbf690f9b72d7fc109495b68a3;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/mtd/maps/alchemy-flash.c b/drivers/mtd/maps/alchemy-flash.c index 7fc8097e4..a57791a6c 100644 --- a/drivers/mtd/maps/alchemy-flash.c +++ b/drivers/mtd/maps/alchemy-flash.c @@ -7,6 +7,7 @@ * */ +#include #include #include #include @@ -125,6 +126,8 @@ 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) @@ -151,7 +154,7 @@ int __init alchemy_mtd_init(void) * Static partition definition selection */ parts = alchemy_partitions; - nb_parts = ARRAY_SIZE(alchemy_partitions); + nb_parts = NB_OF(alchemy_partitions); alchemy_map.size = window_size; /*