]> err.no Git - linux-2.6/blobdiff - drivers/mtd/chips/map_ram.c
Pull regset into release branch
[linux-2.6] / drivers / mtd / chips / map_ram.c
index 9b7c49930a76f5bffb817a1af2b00cee39e5acd8..5cb6d5263661a63f862d458a6b3a2dfdc31686ae 100644 (file)
@@ -55,22 +55,21 @@ static struct mtd_info *map_ram_probe(struct map_info *map)
 #endif
        /* OK. It seems to be RAM. */
 
-       mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        if (!mtd)
                return NULL;
 
-       memset(mtd, 0, sizeof(*mtd));
-
        map->fldrv = &mapram_chipdrv;
        mtd->priv = map;
        mtd->name = map->name;
-       mtd->type = MTD_GENERIC_TYPE;
+       mtd->type = MTD_RAM;
        mtd->size = map->size;
        mtd->erase = mapram_erase;
        mtd->read = mapram_read;
        mtd->write = mapram_write;
        mtd->sync = mapram_nop;
        mtd->flags = MTD_CAP_RAM;
+       mtd->writesize = 1;
 
        mtd->erasesize = PAGE_SIZE;
        while(mtd->size & (mtd->erasesize - 1))