[MTD] replace MTD_ROM with MTD_GENERIC_TYPE
No mtd user should ever check for the device type. Instead, device features should be checked by the flags - if at all. As a first step towards type removal, change MTD_ROM into MTD_GENERIC_TYPE. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
This commit is contained in:
@@ -40,15 +40,13 @@ static struct mtd_info *map_rom_probe(struct map_info *map)
|
||||
map->fldrv = &maprom_chipdrv;
|
||||
mtd->priv = map;
|
||||
mtd->name = map->name;
|
||||
mtd->type = MTD_ROM;
|
||||
mtd->type = MTD_GENERIC_TYPE;
|
||||
mtd->size = map->size;
|
||||
mtd->read = maprom_read;
|
||||
mtd->write = maprom_write;
|
||||
mtd->sync = maprom_nop;
|
||||
mtd->flags = MTD_CAP_ROM;
|
||||
mtd->erasesize = 131072;
|
||||
while(mtd->size & (mtd->erasesize - 1))
|
||||
mtd->erasesize >>= 1;
|
||||
mtd->erasesize = map->size;
|
||||
|
||||
__module_get(THIS_MODULE);
|
||||
return mtd;
|
||||
|
Reference in New Issue
Block a user