VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / mtd / chips / jedec.c
index a665635..2dfd53e 100644 (file)
@@ -11,7 +11,7 @@
  * not going to guess how to send commands to them, plus I expect they will
  * all speak CFI..
  *
- * $Id: jedec.c,v 1.19 2003/05/29 09:25:23 dwmw2 Exp $
+ * $Id: jedec.c,v 1.21 2004/08/09 13:19:43 dwmw2 Exp $
  */
 
 #include <linux/init.h>
@@ -128,7 +128,7 @@ static struct mtd_info *jedec_probe(struct map_info *map)
    {
       printk("mtd: Increase MAX_JEDEC_CHIPS, too many banks.\n");
       kfree(MTD);
-      return 0;
+      return NULL;
    }
    
    for (Base = 0; Base < map->size; Base += my_bank_size)
@@ -141,7 +141,7 @@ static struct mtd_info *jedec_probe(struct map_info *map)
         if (jedec_probe8(map,Base,priv) == 0) {
                 printk("did recognize jedec chip\n");
                 kfree(MTD);
-                return 0;
+                return NULL;
         }
       }
       if (map->buswidth == 2)
@@ -167,7 +167,7 @@ static struct mtd_info *jedec_probe(struct map_info *map)
       {
         printk("mtd: Failed. Device has incompatible mixed sector sizes\n");
         kfree(MTD);
-        return 0;
+        return NULL;
       }      
    }
    
@@ -193,7 +193,7 @@ static struct mtd_info *jedec_probe(struct map_info *map)
       {
         printk("mtd: Internal Error, JEDEC not set\n");
         kfree(MTD);
-        return 0;
+        return NULL;
       }
       
       if (Uniq != 0)
@@ -221,7 +221,7 @@ static struct mtd_info *jedec_probe(struct map_info *map)
    if (!priv->size) {
           printk("priv->size is zero\n");
           kfree(MTD);
-          return 0;
+          return NULL;
    }
    if (priv->size/my_bank_size) {
           if (priv->size/my_bank_size == 1) {
@@ -240,7 +240,7 @@ static struct mtd_info *jedec_probe(struct map_info *map)
                      {
                         printk("mtd: Failed. Cannot handle unsymmetric banking\n");
                         kfree(MTD);
-                        return 0;
+                        return NULL;
                      }      
                   }
           }
@@ -385,7 +385,7 @@ static const struct JEDECTable *jedec_idtoinf(__u8 mfr,__u8 id)
    for (I = 0; JEDEC_table[I].jedec != 0; I++)
       if (JEDEC_table[I].jedec == Id)
         return JEDEC_table + I;
-   return 0;
+   return NULL;
 }
 
 // Look for flash using an 8 bit bus interface
@@ -780,8 +780,7 @@ static int flash_erase(struct mtd_info *mtd, struct erase_info *instr)
                    
    //printk("done\n");
    instr->state = MTD_ERASE_DONE;
-   if (instr->callback)
-       instr->callback(instr);
+   mtd_erase_callback(instr);
    return 0;
    
    #undef flread