aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/doc2001.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/doc2001.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/doc2001.c')
-rw-r--r--drivers/mtd/devices/doc2001.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/mtd/devices/doc2001.c b/drivers/mtd/devices/doc2001.c
index 681a9c73a2a3..18b536ca8546 100644
--- a/drivers/mtd/devices/doc2001.c
+++ b/drivers/mtd/devices/doc2001.c
@@ -324,16 +324,9 @@ static int DoCMil_is_alias(struct DiskOnChip *doc1, struct DiskOnChip *doc2)
324 return retval; 324 return retval;
325} 325}
326 326
327static const char im_name[] = "DoCMil_init"; 327/* This routine is found from the docprobe code by symbol_get(),
328 328 * which will bump the use count of this module. */
329/* This routine is made available to other mtd code via 329void DoCMil_init(struct mtd_info *mtd)
330 * inter_module_register. It must only be accessed through
331 * inter_module_get which will bump the use count of this module. The
332 * addresses passed back in mtd are valid as long as the use count of
333 * this module is non-zero, i.e. between inter_module_get and
334 * inter_module_put. Keith Owens <kaos@ocs.com.au> 29 Oct 2000.
335 */
336static void DoCMil_init(struct mtd_info *mtd)
337{ 330{
338 struct DiskOnChip *this = mtd->priv; 331 struct DiskOnChip *this = mtd->priv;
339 struct DiskOnChip *old = NULL; 332 struct DiskOnChip *old = NULL;
@@ -401,6 +394,7 @@ static void DoCMil_init(struct mtd_info *mtd)
401 return; 394 return;
402 } 395 }
403} 396}
397EXPORT_SYMBOL_GPL(DocMil_init);
404 398
405static int doc_read (struct mtd_info *mtd, loff_t from, size_t len, 399static int doc_read (struct mtd_info *mtd, loff_t from, size_t len,
406 size_t *retlen, u_char *buf) 400 size_t *retlen, u_char *buf)
@@ -856,12 +850,6 @@ int doc_erase (struct mtd_info *mtd, struct erase_info *instr)
856 * 850 *
857 ****************************************************************************/ 851 ****************************************************************************/
858 852
859static int __init init_doc2001(void)
860{
861 inter_module_register(im_name, THIS_MODULE, &DoCMil_init);
862 return 0;
863}
864
865static void __exit cleanup_doc2001(void) 853static void __exit cleanup_doc2001(void)
866{ 854{
867 struct mtd_info *mtd; 855 struct mtd_info *mtd;
@@ -877,11 +865,9 @@ static void __exit cleanup_doc2001(void)
877 kfree(this->chips); 865 kfree(this->chips);
878 kfree(mtd); 866 kfree(mtd);
879 } 867 }
880 inter_module_unregister(im_name);
881} 868}
882 869
883module_exit(cleanup_doc2001); 870module_exit(cleanup_doc2001);
884module_init(init_doc2001);
885 871
886MODULE_LICENSE("GPL"); 872MODULE_LICENSE("GPL");
887MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org> et al."); 873MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org> et al.");