X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fchips%2Fmap_rom.c;fp=drivers%2Fmtd%2Fchips%2Fmap_rom.c;h=1b328b1378fda2d9d288d535434a7113a7262d74;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=624c12c232c8b2989319fadc66236ec9026e81a3;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/drivers/mtd/chips/map_rom.c b/drivers/mtd/chips/map_rom.c index 624c12c23..1b328b137 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;