mtd/drivers/mtd/nand nand_base.c,1.94,1.95

gleixner at infradead.org gleixner at infradead.org
Fri Jun 4 03:12:08 EDT 2004


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

Modified Files:
	nand_base.c 
Log Message:
Use check_wp function everywhere. Signed-off-by: Thomas Gleixner <tglx at linutronix.de>

Index: nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- nand_base.c	28 May 2004 23:53:58 -0000	1.94
+++ nand_base.c	4 Jun 2004 07:12:05 -0000	1.95
@@ -840,7 +840,7 @@
 			datidx += this->eccsize;
 		}
 		break;
-		
+
 	default:
 		printk (KERN_WARNING "Invalid NAND_ECC_MODE %d\n", this->eccmode);
 		BUG();	
@@ -1978,8 +1978,8 @@
 	this->select_chip(mtd, chipnr);
 
 	/* Check the WP bit */
-	this->cmdfunc (mtd, NAND_CMD_STATUS, -1, -1);
-	if (!(this->read_byte(mtd) & 0x80)) {
+	/* Check, if it is write protected */
+	if (nand_check_wp(mtd)) {
 		DEBUG (MTD_DEBUG_LEVEL0, "nand_erase: Device is write protected!!!\n");
 		instr->state = MTD_ERASE_FAILED;
 		goto erase_exit;





More information about the linux-mtd-cvs mailing list