mtd/drivers/mtd/nand nand.c,1.26,1.27

gleixner at infradead.org gleixner at infradead.org
Sat Aug 10 03:58:10 EDT 2002


Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv3260

Modified Files:
	nand.c 
Log Message:
fixed writing tail of data

Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- nand.c	7 Aug 2002 11:19:41 -0000	1.26
+++ nand.c	10 Aug 2002 07:58:07 -0000	1.27
@@ -63,6 +63,10 @@
  *		erase /dev/mtdX from erasing bad blocks and destroying
  *		bad block info
  *
+ *  08-10-2002 	Thomas Gleixner (tglx at linutronix.de)
+ *		Fixed writing tail of data. Thanks to Alice Hennessy
+ *		<ahennessy at mvista.com>.
+ *
  * $Id$
  *
  * This program is free software; you can redistribute it and/or modify
@@ -702,7 +706,7 @@
 			this->cache_page = -1;
 
 		/* Write data into buffer */
-		if ((col + len) >= mtd->oobblock)
+		if ((col + (len - *retlen)) >= mtd->oobblock)
 			for (i = col, cnt = 0; i < mtd->oobblock; i++, cnt++)
 				this->data_buf[i] = buf[(*retlen + cnt)];
 		else





More information about the linux-mtd-cvs mailing list