aboutsummaryrefslogtreecommitdiffstats
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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c
index 624c12c232c8..bc6ee9ef8a31 100644
--- a/drivers/mtd/chips/map_rom.c
+++ b/drivers/mtd/chips/map_rom.c
@@ -46,9 +46,7 @@ static struct mtd_info *map_rom_probe(struct map_info *map)
46 mtd->write = maprom_write; 46 mtd->write = maprom_write;
47 mtd->sync = maprom_nop; 47 mtd->sync = maprom_nop;
48 mtd->flags = MTD_CAP_ROM; 48 mtd->flags = MTD_CAP_ROM;
49 mtd->erasesize = 131072; 49 mtd->erasesize = map->size;
50 while(mtd->size & (mtd->erasesize - 1))
51 mtd->erasesize >>= 1;
52 50
53 __module_get(THIS_MODULE); 51 __module_get(THIS_MODULE);
54 return mtd; 52 return mtd;