[PATCH 1/6] mtd: bcm47xxsflash: write number of written bytes

Hauke Mehrtens hauke at hauke-m.de
Thu Jan 24 11:39:54 EST 2013


The callback assumes the number of read bytes is written to retlen.

Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 drivers/mtd/devices/bcm47xxsflash.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/devices/bcm47xxsflash.c b/drivers/mtd/devices/bcm47xxsflash.c
index 8fe1a09..61a45cb 100644
--- a/drivers/mtd/devices/bcm47xxsflash.c
+++ b/drivers/mtd/devices/bcm47xxsflash.c
@@ -23,6 +23,7 @@ static int bcm47xxsflash_read(struct mtd_info *mtd, loff_t from, size_t len,
 
 	memcpy_fromio(buf, (void __iomem *)KSEG0ADDR(b47s->window + from),
 		      len);
+	*retlen = len;
 
 	return len;
 }
-- 
1.7.10.4




More information about the linux-mtd mailing list