}
};
+#define NB_OF(x) (sizeof(x)/sizeof(x[0]))
+
int __init init_ocotea(void)
{
u8 fpga0_reg;
if (flash) {
flash->owner = THIS_MODULE;
add_mtd_partitions(flash, ocotea_small_partitions,
- ARRAY_SIZE(ocotea_small_partitions));
+ NB_OF(ocotea_small_partitions));
} else {
printk("map probe failed for flash\n");
return -ENXIO;
if (flash) {
flash->owner = THIS_MODULE;
add_mtd_partitions(flash, ocotea_large_partitions,
- ARRAY_SIZE(ocotea_large_partitions));
+ NB_OF(ocotea_large_partitions));
} else {
printk("map probe failed for flash\n");
return -ENXIO;