patch-2.4.0-test11 linux/drivers/mtd/doc2001.c
Next file: linux/drivers/mtd/docprobe.c
Previous file: linux/drivers/mtd/doc2000.c
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Tue Nov 7 10:46:04 2000
- Orig file:
v2.4.0-test10/linux/drivers/mtd/doc2001.c
- Orig date:
Thu Jul 13 10:19:55 2000
diff -u --recursive --new-file v2.4.0-test10/linux/drivers/mtd/doc2001.c linux/drivers/mtd/doc2001.c
@@ -321,6 +321,15 @@
return retval;
}
+static const char im_name[] = "DoCMil_init";
+
+/* This routine is made available to other mtd code via
+ * inter_module_register. It must only be accessed through
+ * inter_module_get which will bump the use count of this module. The
+ * addresses passed back in mtd are valid as long as the use count of
+ * this module is non-zero, i.e. between inter_module_get and
+ * inter_module_put. Keith Owens <kaos@ocs.com.au> 29 Oct 2000.
+ */
void DoCMil_init(struct mtd_info *mtd)
{
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv;
@@ -386,8 +395,6 @@
}
}
-EXPORT_SYMBOL(DoCMil_init);
-
static int doc_read (struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf)
{
@@ -780,6 +787,12 @@
*
****************************************************************************/
+static int __init init_doc2001(void)
+{
+ inter_module_register(im_name, THIS_MODULE, &DoCMil_init);
+ return 0;
+}
+
#if LINUX_VERSION_CODE < 0x20300
#ifdef MODULE
#define cleanup_doc2001 cleanup_module
@@ -803,10 +816,12 @@
kfree(this->chips);
kfree(mtd);
}
+ inter_module_unregister(im_name);
}
+module_init(init_doc2001);
+
#if LINUX_VERSION_CODE > 0x20300
module_exit(cleanup_doc2001);
#endif
-
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)