+#ifdef SOLARIS2
+
+static struct fmodsw fsw =
+{
+ "chu",
+ &chuinfo,
+ D_NEW
+};
+
+extern struct mod_ops mod_strmodops;
+
+static struct modlstrmod modlstrmod =
+{
+ &mod_strmodops,
+ "CHU timecode decoder v2.3",
+ &fsw
+};
+
+static struct modlinkage modlinkage =
+{
+ MODREV_1,
+ (void*) &modlstrmod,
+ NULL
+};
+
+int _init()
+{
+ int i;
+
+ for (i=0; i<NCHU; i++)
+ our_priv_data[i].in_use=0;
+
+ return mod_install(&modlinkage);
+}
+
+int _info(foo)
+struct modinfo *foo;
+{
+ return mod_info(&modlinkage,foo);
+}
+
+int _fini()
+{
+ int dev;
+
+ for (dev = 0; dev < NCHU; dev++)
+ if (our_priv_data[dev].in_use)
+ {
+ /* One of the modules is still open */
+ /* This is likely supposed to be impossible under Solaris 2.x */
+ return (EBUSY);
+ }
+
+ return mod_remove(&modlinkage);
+}
+
+#endif /* SOLARIS2 */
+