Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21c8db9e authored by David Woodhouse's avatar David Woodhouse
Browse files

[MTD] Restore MTD_ROM and MTD_RAM types



Let's not attempt the abolition of mtd->type until/unless it's properly
thought through. And certainly, let's not do it by halves.

Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 783ed81f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ static struct mtd_info *map_ram_probe(struct map_info *map)
	map->fldrv = &mapram_chipdrv;
	mtd->priv = map;
	mtd->name = map->name;
	mtd->type = MTD_GENERIC_TYPE;
	mtd->type = MTD_RAM;
	mtd->size = map->size;
	mtd->erase = mapram_erase;
	mtd->read = mapram_read;
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ 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_GENERIC_TYPE;
	mtd->type = MTD_ROM;
	mtd->size = map->size;
	mtd->read = maprom_read;
	mtd->write = maprom_write;
+1 −1
Original line number Diff line number Diff line
@@ -324,7 +324,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)

	dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
	dev->mtd.erasesize = erase_size;
	dev->mtd.type = MTD_GENERIC_TYPE;
	dev->mtd.type = MTD_RAM;
	dev->mtd.flags = MTD_CAP_RAM;
	dev->mtd.erase = block2mtd_erase;
	dev->mtd.write = block2mtd_write;
+1 −1
Original line number Diff line number Diff line
@@ -218,7 +218,7 @@ static int __init ms02nv_init_one(ulong addr)
	fixsize = (size - (fixaddr - addr)) & ~(PAGE_SIZE - 1);
	mp->uaddr = phys_to_virt(fixaddr);

	mtd->type = MTD_GENERIC_TYPE;
	mtd->type = MTD_RAM;
	mtd->flags = MTD_CAP_RAM;
	mtd->size = fixsize;
	mtd->name = (char *)ms02nv_name;
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,

	/* Setup the MTD structure */
	mtd->name = name;
	mtd->type = MTD_GENERIC_TYPE;
	mtd->type = MTD_RAM;
	mtd->flags = MTD_CAP_RAM;
	mtd->size = size;
	mtd->writesize = 1;
Loading