diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-05-08 17:35:05 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-08 17:35:05 -0400 |
commit | a15bdeef108d282e540e202fc3c3e4bdf9692074 (patch) | |
tree | 1bc767c9013713a4d62d1bc5dffef631583e6ee7 /drivers/mtd/chips/cfi_cmdset_0001.c | |
parent | 396674e58fb9d01b7768ccb8db181aea8ebead0e (diff) |
Remove use of inter_module_crap in NOR flash chip drivers.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0001.c')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 1c074d63ff3a..fe00af3f9195 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
@@ -331,13 +331,6 @@ read_pri_intelext(struct map_info *map, __u16 adr) | |||
331 | return extp; | 331 | return extp; |
332 | } | 332 | } |
333 | 333 | ||
334 | /* This routine is made available to other mtd code via | ||
335 | * inter_module_register. It must only be accessed through | ||
336 | * inter_module_get which will bump the use count of this module. The | ||
337 | * addresses passed back in cfi are valid as long as the use count of | ||
338 | * this module is non-zero, i.e. between inter_module_get and | ||
339 | * inter_module_put. Keith Owens <kaos@ocs.com.au> 29 Oct 2000. | ||
340 | */ | ||
341 | struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) | 334 | struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) |
342 | { | 335 | { |
343 | struct cfi_private *cfi = map->fldrv_priv; | 336 | struct cfi_private *cfi = map->fldrv_priv; |
@@ -415,6 +408,11 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) | |||
415 | 408 | ||
416 | return cfi_intelext_setup(mtd); | 409 | return cfi_intelext_setup(mtd); |
417 | } | 410 | } |
411 | struct mtd_info *cfi_cmdset_0003(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0001"))); | ||
412 | struct mtd_info *cfi_cmdset_0200(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0001"))); | ||
413 | EXPORT_SYMBOL_GPL(cfi_cmdset_0001); | ||
414 | EXPORT_SYMBOL_GPL(cfi_cmdset_0003); | ||
415 | EXPORT_SYMBOL_GPL(cfi_cmdset_0200); | ||
418 | 416 | ||
419 | static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd) | 417 | static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd) |
420 | { | 418 | { |
@@ -2445,28 +2443,8 @@ static void cfi_intelext_destroy(struct mtd_info *mtd) | |||
2445 | kfree(mtd->eraseregions); | 2443 | kfree(mtd->eraseregions); |
2446 | } | 2444 | } |
2447 | 2445 | ||
2448 | static char im_name_0001[] = "cfi_cmdset_0001"; | ||
2449 | static char im_name_0003[] = "cfi_cmdset_0003"; | ||
2450 | static char im_name_0200[] = "cfi_cmdset_0200"; | ||
2451 | |||
2452 | static int __init cfi_intelext_init(void) | ||
2453 | { | ||
2454 | inter_module_register(im_name_0001, THIS_MODULE, &cfi_cmdset_0001); | ||
2455 | inter_module_register(im_name_0003, THIS_MODULE, &cfi_cmdset_0001); | ||
2456 | inter_module_register(im_name_0200, THIS_MODULE, &cfi_cmdset_0001); | ||
2457 | return 0; | ||
2458 | } | ||
2459 | |||
2460 | static void __exit cfi_intelext_exit(void) | ||
2461 | { | ||
2462 | inter_module_unregister(im_name_0001); | ||
2463 | inter_module_unregister(im_name_0003); | ||
2464 | inter_module_unregister(im_name_0200); | ||
2465 | } | ||
2466 | |||
2467 | module_init(cfi_intelext_init); | ||
2468 | module_exit(cfi_intelext_exit); | ||
2469 | |||
2470 | MODULE_LICENSE("GPL"); | 2446 | MODULE_LICENSE("GPL"); |
2471 | MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org> et al."); | 2447 | MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org> et al."); |
2472 | MODULE_DESCRIPTION("MTD chip driver for Intel/Sharp flash chips"); | 2448 | MODULE_DESCRIPTION("MTD chip driver for Intel/Sharp flash chips"); |
2449 | MODULE_ALIAS("cfi_cmdset_0003"); | ||
2450 | MODULE_ALIAS("cfi_cmdset_0200"); | ||