linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / mtd / devices / ms02-nv.c
index 08dfb89..0ff2e43 100644 (file)
@@ -219,13 +219,12 @@ static int __init ms02nv_init_one(ulong addr)
        mp->uaddr = phys_to_virt(fixaddr);
 
        mtd->type = MTD_RAM;
-       mtd->flags = MTD_CAP_RAM;
+       mtd->flags = MTD_CAP_RAM | MTD_XIP;
        mtd->size = fixsize;
        mtd->name = (char *)ms02nv_name;
        mtd->owner = THIS_MODULE;
        mtd->read = ms02nv_read;
        mtd->write = ms02nv_write;
-       mtd->writesize = 1;
 
        ret = -EIO;
        if (add_mtd_device(mtd)) {
@@ -309,7 +308,7 @@ static int __init ms02nv_init(void)
                break;
        }
 
-       for (i = 0; i < ARRAY_SIZE(ms02nv_addrs); i++)
+       for (i = 0; i < (sizeof(ms02nv_addrs) / sizeof(*ms02nv_addrs)); i++)
                if (!ms02nv_init_one(ms02nv_addrs[i] << stride))
                        count++;