aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/doc2000.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-08 09:05:05 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-08 09:05:05 -0400
commit5e535429a9117b8b6219da0e0cb087f52c0c9597 (patch)
treeb20a402b5696e2b5aabdc7a4720eaf33e306bd71 /drivers/mtd/devices/doc2000.c
parent73566edf9b91dd085ddb12033d0ea7288979dd10 (diff)
Remove inter_module_xxx() from DiskOnChip drivers.
Finally putting it back how it was before Keith got at it -- yay :) Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/devices/doc2000.c')
-rw-r--r--drivers/mtd/devices/doc2000.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/mtd/devices/doc2000.c b/drivers/mtd/devices/doc2000.c
index 23e7a5c7d2c1..40cc20f6d164 100644
--- a/drivers/mtd/devices/doc2000.c
+++ b/drivers/mtd/devices/doc2000.c
@@ -517,16 +517,9 @@ static int DoC2k_is_alias(struct DiskOnChip *doc1, struct DiskOnChip *doc2)
517 return retval; 517 return retval;
518} 518}
519 519
520static const char im_name[] = "DoC2k_init"; 520/* This routine is found from the docprobe code by symbol_get(),
521 521 * which will bump the use count of this module. */
522/* This routine is made available to other mtd code via 522void DoC2k_init(struct mtd_info *mtd)
523 * inter_module_register. It must only be accessed through
524 * inter_module_get which will bump the use count of this module. The
525 * addresses passed back in mtd are valid as long as the use count of
526 * this module is non-zero, i.e. between inter_module_get and
527 * inter_module_put. Keith Owens <kaos@ocs.com.au> 29 Oct 2000.
528 */
529static void DoC2k_init(struct mtd_info *mtd)
530{ 523{
531 struct DiskOnChip *this = mtd->priv; 524 struct DiskOnChip *this = mtd->priv;
532 struct DiskOnChip *old = NULL; 525 struct DiskOnChip *old = NULL;
@@ -623,6 +616,7 @@ static void DoC2k_init(struct mtd_info *mtd)
623 return; 616 return;
624 } 617 }
625} 618}
619EXPORT_SYMBOL_GPL(DoC2k_init);
626 620
627static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, 621static int doc_read(struct mtd_info *mtd, loff_t from, size_t len,
628 size_t * retlen, u_char * buf) 622 size_t * retlen, u_char * buf)
@@ -1277,12 +1271,6 @@ static int doc_erase(struct mtd_info *mtd, struct erase_info *instr)
1277 * 1271 *
1278 ****************************************************************************/ 1272 ****************************************************************************/
1279 1273
1280static int __init init_doc2000(void)
1281{
1282 inter_module_register(im_name, THIS_MODULE, &DoC2k_init);
1283 return 0;
1284}
1285
1286static void __exit cleanup_doc2000(void) 1274static void __exit cleanup_doc2000(void)
1287{ 1275{
1288 struct mtd_info *mtd; 1276 struct mtd_info *mtd;
@@ -1298,11 +1286,9 @@ static void __exit cleanup_doc2000(void)
1298 kfree(this->chips); 1286 kfree(this->chips);
1299 kfree(mtd); 1287 kfree(mtd);
1300 } 1288 }
1301 inter_module_unregister(im_name);
1302} 1289}
1303 1290
1304module_exit(cleanup_doc2000); 1291module_exit(cleanup_doc2000);
1305module_init(init_doc2000);
1306 1292
1307MODULE_LICENSE("GPL"); 1293MODULE_LICENSE("GPL");
1308MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org> et al."); 1294MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org> et al.");