Module Name:    src
Committed By:   pgoyette
Date:           Wed Sep 12 00:36:41 UTC 2012

Modified Files:
        src/sys/dev/i2c: spdmem_i2c.c

Log Message:
Initialize the sysctl(9) stuff before configuring the spd(4) devices.

Otherwise, the devices do not create their own sysctl nodes!


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/spdmem_i2c.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/dev/i2c/spdmem_i2c.c
diff -u src/sys/dev/i2c/spdmem_i2c.c:1.5 src/sys/dev/i2c/spdmem_i2c.c:1.6
--- src/sys/dev/i2c/spdmem_i2c.c:1.5	Thu May 31 16:09:33 2012
+++ src/sys/dev/i2c/spdmem_i2c.c	Wed Sep 12 00:36:41 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem_i2c.c,v 1.5 2012/05/31 16:09:33 pgoyette Exp $ */
+/* $NetBSD: spdmem_i2c.c,v 1.6 2012/09/12 00:36:41 pgoyette Exp $ */
 
 /*
  * Copyright (c) 2007 Nicolas Joly
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.5 2012/05/31 16:09:33 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.6 2012/09/12 00:36:41 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -152,9 +152,9 @@ spdmem_modcmd(modcmd_t cmd, void *opaque
 	switch (cmd) {
 	case MODULE_CMD_INIT:
 #ifdef _MODULE
+		sysctl_spdmem_setup(&spdmem_sysctl_clog);
 		error = config_init_component(cfdriver_ioconf_spdmem,
 		    cfattach_ioconf_spdmem, cfdata_ioconf_spdmem);
-		sysctl_spdmem_setup(&spdmem_sysctl_clog);
 #endif
 		return error;
 	case MODULE_CMD_FINI:

Reply via email to