aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/cfi_cmdset_0001.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-08 17:35:05 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-08 17:35:05 -0400
commita15bdeef108d282e540e202fc3c3e4bdf9692074 (patch)
tree1bc767c9013713a4d62d1bc5dffef631583e6ee7 /drivers/mtd/chips/cfi_cmdset_0001.c
parent396674e58fb9d01b7768ccb8db181aea8ebead0e (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.c36
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 */
341struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) 334struct 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}
411struct mtd_info *cfi_cmdset_0003(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0001")));
412struct mtd_info *cfi_cmdset_0200(struct map_info *map, int primary) __attribute__((alias("cfi_cmdset_0001")));
413EXPORT_SYMBOL_GPL(cfi_cmdset_0001);
414EXPORT_SYMBOL_GPL(cfi_cmdset_0003);
415EXPORT_SYMBOL_GPL(cfi_cmdset_0200);
418 416
419static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd) 417static 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
2448static char im_name_0001[] = "cfi_cmdset_0001";
2449static char im_name_0003[] = "cfi_cmdset_0003";
2450static char im_name_0200[] = "cfi_cmdset_0200";
2451
2452static 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
2460static 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
2467module_init(cfi_intelext_init);
2468module_exit(cfi_intelext_exit);
2469
2470MODULE_LICENSE("GPL"); 2446MODULE_LICENSE("GPL");
2471MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org> et al."); 2447MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org> et al.");
2472MODULE_DESCRIPTION("MTD chip driver for Intel/Sharp flash chips"); 2448MODULE_DESCRIPTION("MTD chip driver for Intel/Sharp flash chips");
2449MODULE_ALIAS("cfi_cmdset_0003");
2450MODULE_ALIAS("cfi_cmdset_0200");