X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fchips%2Fmap_ram.c;h=7e17b452e1c23ede060e65e07f4b64b47f1777aa;hb=5e3b93f248c98873cc843e83092bb8da92ac85a2;hp=283be02dc311af6f7fedf517a074b0c1d884c941;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c index 283be02dc..7e17b452e 100644 --- a/drivers/mtd/chips/map_ram.c +++ b/drivers/mtd/chips/map_ram.c @@ -1,7 +1,7 @@ /* * Common code to handle map devices which are simple RAM * (C) 2000 Red Hat. GPL'd. - * $Id: map_ram.c,v 1.20 2004/08/09 13:19:43 dwmw2 Exp $ + * $Id: map_ram.c,v 1.17 2003/05/28 12:51:49 dwmw2 Exp $ */ #include @@ -104,17 +104,13 @@ static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr) /* Yeah, it's inefficient. Who cares? It's faster than a _real_ flash erase. */ struct map_info *map = (struct map_info *)mtd->priv; - map_word allff; unsigned long i; - allff = map_word_ff(map); + for (i=0; ilen; i++) + map_write8(map, 0xFF, instr->addr + i); - for (i=0; ilen; i += map_bankwidth(map)) - map_write(map, allff, instr->addr + i); - - instr->state = MTD_ERASE_DONE; - - mtd_erase_callback(instr); + if (instr->callback) + instr->callback(instr); return 0; }