diff options
Diffstat (limited to 'drivers/mtd/chips')
-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) | |||
40 | map->fldrv = &maprom_chipdrv; | 40 | map->fldrv = &maprom_chipdrv; |
41 | mtd->priv = map; | 41 | mtd->priv = map; |
42 | mtd->name = map->name; | 42 | mtd->name = map->name; |
43 | mtd->type = MTD_ROM; | 43 | mtd->type = MTD_GENERIC_TYPE; |
44 | mtd->size = map->size; | 44 | mtd->size = map->size; |
45 | mtd->read = maprom_read; | 45 | mtd->read = maprom_read; |
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; |