X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fnand%2Fau1550nd.c;h=201e1362da14748a493dea2acd719c72fd750e83;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=bde3550910a2e12626b7255e23a92982776a8668;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c index bde355091..201e1362d 100644 --- a/drivers/mtd/nand/au1550nd.c +++ b/drivers/mtd/nand/au1550nd.c @@ -55,6 +55,8 @@ 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 @@ -460,7 +462,7 @@ int __init au1xxx_nand_init (void) } /* Register the partitions */ - add_mtd_partitions(au1550_mtd, partition_info, ARRAY_SIZE(partition_info)); + add_mtd_partitions(au1550_mtd, partition_info, NB_OF(partition_info)); return 0;