X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fchips%2Fcfi_cmdset_0020.c;h=98817c2d906f3bcb4af68bfbf80e00b6cba4a93f;hb=b4e5fe4ac713ec66470b6fc3eeb828603b8ed76a;hp=326eaf7a2bbb99a67ebc656ed9e569029663ed8b;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index 326eaf7a2..98817c2d9 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c @@ -4,7 +4,7 @@ * * (C) 2000 Red Hat. GPL'd * - * $Id: cfi_cmdset_0020.c,v 1.15 2004/08/09 13:19:43 dwmw2 Exp $ + * $Id: cfi_cmdset_0020.c,v 1.13 2004/07/12 21:52:50 dwmw2 Exp $ * * 10/10/2000 Nicolas Pitre * - completely revamped method functions so they are aware and @@ -966,7 +966,8 @@ int cfi_staa_erase_varsize(struct mtd_info *mtd, struct erase_info *instr) } instr->state = MTD_ERASE_DONE; - mtd_erase_callback(instr); + if (instr->callback) + instr->callback(instr); return 0; } @@ -1399,6 +1400,11 @@ static void cfi_staa_destroy(struct mtd_info *mtd) kfree(cfi); } +#if LINUX_VERSION_CODE < 0x20212 && defined(MODULE) +#define cfi_staa_init init_module +#define cfi_staa_exit cleanup_module +#endif + static char im_name[]="cfi_cmdset_0020"; int __init cfi_staa_init(void)