X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fchips%2Fjedec.c;h=2dfd53ed39d2b07e6710a3868a33acef650bf794;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=a6656354130b164397a51efafab814909508df10;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/mtd/chips/jedec.c b/drivers/mtd/chips/jedec.c index a66563541..2dfd53ed3 100644 --- a/drivers/mtd/chips/jedec.c +++ b/drivers/mtd/chips/jedec.c @@ -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 @@ -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