This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / mtd / devices / slram.c
index fd579ae..4dbcfcf 100644 (file)
@@ -1,6 +1,6 @@
 /*======================================================================
 
-  $Id: slram.c,v 1.31 2004/08/09 13:19:44 dwmw2 Exp $
+  $Id: slram.c,v 1.30 2003/05/20 21:03:08 dwmw2 Exp $
 
   This driver provides a method to access memory not used by the kernel
   itself (i.e. if the kernel commandline mem=xxx is used). To actually
@@ -98,7 +98,12 @@ int slram_erase(struct mtd_info *mtd, struct erase_info *instr)
 
        instr->state = MTD_ERASE_DONE;
 
-       mtd_erase_callback(instr);
+       if (instr->callback) {
+               (*(instr->callback))(instr);
+       }
+       else {
+               kfree(instr);
+       }
 
        return(0);
 }