mtd/drivers/mtd/nand nand.c,1.69,1.70

gleixner at infradead.org gleixner at infradead.org
Mon Mar 29 03:36:48 EST 2004


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

Modified Files:
	nand.c 
Log Message:
use verify_buf and read_buf everywhere

Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- nand.c	29 Mar 2004 00:39:31 -0000	1.69
+++ nand.c	29 Mar 2004 08:36:46 -0000	1.70
@@ -876,8 +876,7 @@
 		}
 
 		/* read oobdata */
-		for (j = 0; j <  mtd->oobsize; j++) 
-			oob_data[oob + j] = this->read_byte(mtd);
+		this->read_buf(mtd, &oob_data[oob], mtd->oobsize);
 		
 		/* Skip ECC, if not active */
 		if (eccmode == NAND_ECC_NONE)
@@ -1248,13 +1247,10 @@
 	/* Send command to read back the data */
 	this->cmdfunc (mtd, NAND_CMD_READOOB, column, page & this->pagemask);
 
-	/* Loop through and verify the data */
-	for (i = 0; i < len; i++) {
-		if (buf[i] != this->read_byte(mtd)) {
-			DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write verify, page 0x%08x\n", page);
-			ret = -EIO;
-			goto out;
-		}
+	if (this->verify_buf(mtd, buf, len)) {
+		DEBUG (MTD_DEBUG_LEVEL0, "nand_write_oob: " "Failed write verify, page 0x%08x\n", page);
+		ret = -EIO;
+		goto out;
 	}
 #endif
 




More information about the linux-mtd-cvs mailing list