summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/map_rom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/chips/map_rom.c')
-rw-r--r--drivers/mtd/chips/map_rom.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c
index 624c12c232c..1b328b1378f 100644
--- a/drivers/mtd/chips/map_rom.c
+++ b/drivers/mtd/chips/map_rom.c
@@ -46,9 +46,8 @@ static struct mtd_info *map_rom_probe(struct map_info *map)
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;
+ mtd->writesize = 1;
__module_get(THIS_MODULE);
return mtd;