Module Name: src
Committed By: pgoyette
Date: Tue Jan 14 14:16:47 UTC 2014
Modified Files:
src/sys/opencrypto: crypto.c
Log Message:
Clean-up module initialization
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/opencrypto/crypto.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/opencrypto/crypto.c
diff -u src/sys/opencrypto/crypto.c:1.43 src/sys/opencrypto/crypto.c:1.44
--- src/sys/opencrypto/crypto.c:1.43 Mon Jan 13 21:15:36 2014
+++ src/sys/opencrypto/crypto.c Tue Jan 14 14:16:47 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: crypto.c,v 1.43 2014/01/13 21:15:36 pgoyette Exp $ */
+/* $NetBSD: crypto.c,v 1.44 2014/01/14 14:16:47 pgoyette Exp $ */
/* $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $ */
/* $OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $ */
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.43 2014/01/13 21:15:36 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.44 2014/01/14 14:16:47 pgoyette Exp $");
#include <sys/param.h>
#include <sys/reboot.h>
@@ -249,6 +249,10 @@ static struct cryptostats cryptostats;
static int crypto_timing = 0;
#endif
+#ifdef _MODULE
+ static struct sysctllog *sysctl_opencrypto_clog;
+#endif
+
static int
crypto_init0(void)
{
@@ -282,6 +286,9 @@ crypto_init0(void)
crypto_destroy();
}
+#ifdef _MODULE
+ sysctl_opencrypto_setup(&sysctl_opencrypto_clog);
+#endif
return 0;
}
@@ -1342,14 +1349,11 @@ MODULE(MODULE_CLASS_MISC, opencrypto, NU
static int
opencrypto_modcmd(modcmd_t cmd, void *opaque)
{
-#ifdef _MODULE
- static struct sysctllog *sysctl_opencrypto_clog;
-#endif
switch (cmd) {
case MODULE_CMD_INIT:
#ifdef _MODULE
- sysctl_opencrypto_setup(&sysctl_opencrypto_clog);
+ crypto_init();
#endif
return 0;
case MODULE_CMD_FINI: