mtd/drivers/mtd/devices blkmtd-24.c, 1.21, 1.22 blkmtd.c, 1.21, 1.22 doc2000.c, 1.60, 1.61 doc2001.c, 1.42, 1.43 doc2001plus.c, 1.8, 1.9 lart.c, 1.6, 1.7 mtdram.c, 1.32, 1.33 phram.c, 1.1, 1.2 pmc551.c, 1.27, 1.28 slram.c, 1.30, 1.31

David Woodhouse dwmw2 at infradead.org
Mon Aug 9 09:19:48 EDT 2004


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

Modified Files:
	blkmtd-24.c blkmtd.c doc2000.c doc2001.c doc2001plus.c lart.c 
	mtdram.c phram.c pmc551.c slram.c 
Log Message:
Change alls driver to mtd_erase_callback, make partitions non-modular.

Index: blkmtd-24.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/blkmtd-24.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- blkmtd-24.c	2 Aug 2004 09:46:15 -0000	1.21
+++ blkmtd-24.c	9 Aug 2004 13:19:44 -0000	1.22
@@ -466,9 +466,7 @@
 
 	DEBUG(3, "blkmtd: erase: checking callback\n");
  erase_callback:
-	if (instr->callback) {
-		(*(instr->callback))(instr);
-	}
+	mtd_erase_callback(instr);
 	DEBUG(2, "blkmtd: erase: finished (err = %d)\n", err);
 	return err;
 }

Index: blkmtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/blkmtd.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- blkmtd.c	2 Aug 2004 09:51:25 -0000	1.21
+++ blkmtd.c	9 Aug 2004 13:19:44 -0000	1.22
@@ -435,9 +435,7 @@
 	}
 
 	DEBUG(3, "blkmtd: erase: checking callback\n");
-	if (instr->callback) {
-		(*(instr->callback))(instr);
-	}
+	mtd_erase_callback(instr);
 	DEBUG(2, "blkmtd: erase: finished (err = %d)\n", err);
 	return err;
 }

Index: doc2000.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2000.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- doc2000.c	7 Apr 2004 08:30:04 -0000	1.60
+++ doc2000.c	9 Aug 2004 13:19:44 -0000	1.61
@@ -1277,8 +1277,7 @@
 	instr->state = MTD_ERASE_DONE;
 
  callback:
-	if (instr->callback)
-		instr->callback(instr);
+	mtd_erase_callback(instr);
 
 	up(&this->lock);
 	return 0;

Index: doc2001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2001.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- doc2001.c	4 Apr 2004 12:36:45 -0000	1.42
+++ doc2001.c	9 Aug 2004 13:19:44 -0000	1.43
@@ -841,8 +841,7 @@
 		instr->state = MTD_ERASE_DONE;
 	dummy = ReadDOC(docptr, LastDataRead);
 
-	if (instr->callback) 
-		instr->callback(instr);
+	mtd_erase_callback(instr);
 
 	return 0;
 }

Index: doc2001plus.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/doc2001plus.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- doc2001plus.c	4 Apr 2004 12:36:45 -0000	1.8
+++ doc2001plus.c	9 Aug 2004 13:19:44 -0000	1.9
@@ -1111,8 +1111,7 @@
 	/* Disable flash internally */
 	WriteDOC(0, docptr, Mplus_FlashSelect);
 
-	if (instr->callback) 
-		instr->callback(instr);
+	mtd_erase_callback(instr);
 
 	return 0;
 }

Index: lart.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/lart.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- lart.c	14 Jul 2004 17:21:38 -0000	1.6
+++ lart.c	9 Aug 2004 13:19:44 -0000	1.7
@@ -433,7 +433,7 @@
 	 }
 
    instr->state = MTD_ERASE_DONE;
-   if (instr->callback) instr->callback (instr);
+   mtd_erase_callback(instr);
 
    return (0);
 }

Index: mtdram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/mtdram.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- mtdram.c	21 May 2003 15:15:07 -0000	1.32
+++ mtdram.c	9 Aug 2004 13:19:44 -0000	1.33
@@ -57,9 +57,8 @@
   memset((char *)mtd->priv + instr->addr, 0xff, instr->len);
 	
   instr->state = MTD_ERASE_DONE;
+  mtd_erase_callback(instr);
 
-  if (instr->callback)
-    (*(instr->callback))(instr);
   return 0;
 }
 

Index: phram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/phram.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- phram.c	21 Aug 2003 17:52:30 -0000	1.1
+++ phram.c	9 Aug 2004 13:19:44 -0000	1.2
@@ -55,10 +55,7 @@
 
 	instr->state = MTD_ERASE_DONE;
 
-	if (instr->callback)
-		(*(instr->callback))(instr);
-	else
-		kfree(instr);
+	mtd_erase_callback(instr);
 
 	return 0;
 }

Index: pmc551.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/pmc551.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- pmc551.c	20 Jul 2004 02:44:26 -0000	1.27
+++ pmc551.c	9 Aug 2004 13:19:44 -0000	1.28
@@ -169,9 +169,7 @@
 	printk(KERN_DEBUG "pmc551_erase() done\n");
 #endif
 
-        if (instr->callback) {
-                (*(instr->callback))(instr);
-	}
+        mtd_erase_callback(instr);
         return 0;
 }
 

Index: slram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/slram.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- slram.c	20 May 2003 21:03:08 -0000	1.30
+++ slram.c	9 Aug 2004 13:19:44 -0000	1.31
@@ -98,12 +98,7 @@
 
 	instr->state = MTD_ERASE_DONE;
 
-	if (instr->callback) {
-		(*(instr->callback))(instr);
-	}
-	else {
-		kfree(instr);
-	}
+	mtd_erase_callback(instr);
 
 	return(0);
 }





More information about the linux-mtd-cvs mailing list