diff options
author | Joern Engel <joern@wh.fh-wedel.de> | 2006-05-30 14:25:17 +0200 |
---|---|---|
committer | Joern Engel <joern@wh.fh-wedel.de> | 2006-05-30 14:25:17 +0200 |
commit | e369d62e92d526a7ed641e2f0b2978fb0ce366c5 (patch) | |
tree | 472a4b65509c725a84ca9ecc61516cc904189029 /drivers | |
parent | e1219724be193519f20743f5500bd1eff11890d0 (diff) | |
download | linux-e369d62e92d526a7ed641e2f0b2978fb0ce366c5.tar.gz linux-e369d62e92d526a7ed641e2f0b2978fb0ce366c5.tar.bz2 linux-e369d62e92d526a7ed641e2f0b2978fb0ce366c5.zip |
[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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/chips/map_rom.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c index 624c12c232c8..d59ac0136510 100644 --- a/drivers/mtd/chips/map_rom.c +++ b/drivers/mtd/chips/map_rom.c @@ -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; |