Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/opencrypto Clean-up module initialization
details: https://anonhg.NetBSD.org/src/rev/3ae1cfd5899d
branches: trunk
changeset: 325965:3ae1cfd5899d
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Tue Jan 14 14:16:47 2014 +0000
description:
Clean-up module initialization
diffstat:
sys/opencrypto/crypto.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r c5debf5bc5cc -r 3ae1cfd5899d sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c Tue Jan 14 13:23:46 2014 +0000
+++ b/sys/opencrypto/crypto.c Tue Jan 14 14:16:47 2014 +0000
@@ -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 int crypto_timing = 0;
#endif
+#ifdef _MODULE
+ static struct sysctllog *sysctl_opencrypto_clog;
+#endif
+
static int
crypto_init0(void)
{
@@ -282,6 +286,9 @@
crypto_destroy();
}
+#ifdef _MODULE
+ sysctl_opencrypto_setup(&sysctl_opencrypto_clog);
+#endif
return 0;
}
@@ -1342,14 +1349,11 @@
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:
Home |
Main Index |
Thread Index |
Old Index