Patchwork [U-Boot,2/6] cfi_mtd: add writebufsize initialization

login
register
mail settings
Submitter Holger Brunck
Date Jan. 20, 2011, 4:17 p.m.
Message ID <1295540225-11083-2-git-send-email-holger.brunck@keymile.com>
Download mbox | patch
Permalink /patch/79715/
State Rejected
Delegated to: Stefan Roese
Headers show

Comments

Holger Brunck - Jan. 20, 2011, 4:17 p.m.
Initialize mtd->writebufsize to the value obtained by
by the CFI informations.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
 drivers/mtd/cfi_mtd.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/mtd/cfi_mtd.c b/drivers/mtd/cfi_mtd.c
index cbcc165..29e32b2 100644
--- a/drivers/mtd/cfi_mtd.c
+++ b/drivers/mtd/cfi_mtd.c
@@ -241,6 +241,7 @@  int cfi_mtd_init(void)
 		mtd->flags		= MTD_CAP_NORFLASH;
 		mtd->size		= fi->size;
 		mtd->writesize		= 1;
+		mtd->writebufsize	= fi->buffer_size;
 
 		mtd->erase		= cfi_mtd_erase;
 		mtd->read		= cfi_mtd_read;