Patchwork mtd: mtdram: initialize writebufsize field

login
register
mail settings
Submitter Artem Bityutskiy
Date Feb. 2, 2011, 6:56 a.m.
Message ID <1296629774-22498-1-git-send-email-Artem.Bityutskiy@nokia.com>
Download mbox | patch
Permalink /patch/81425/
State New
Headers show

Comments

Artem Bityutskiy - Feb. 2, 2011, 6:56 a.m.
Set the 'mtd->writebufsize' field to 64 to mimic modern CFI flashes.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 drivers/mtd/devices/mtdram.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c
index 26a6e80..1483e18 100644
--- a/drivers/mtd/devices/mtdram.c
+++ b/drivers/mtd/devices/mtdram.c
@@ -121,6 +121,7 @@  int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,
 	mtd->flags = MTD_CAP_RAM;
 	mtd->size = size;
 	mtd->writesize = 1;
+	mtd->writebufsize = 64; /* Mimic CFI NOR flashes */
 	mtd->erasesize = MTDRAM_ERASE_SIZE;
 	mtd->priv = mapped_address;