Module Name:    src
Committed By:   msaitoh
Date:           Tue Jul 26 08:13:57 UTC 2016

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

Log Message:
Move functions to make module related code at the bottom of this file.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/i2c/sdtemp.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/sdtemp.c
diff -u src/sys/dev/i2c/sdtemp.c:1.28 src/sys/dev/i2c/sdtemp.c:1.29
--- src/sys/dev/i2c/sdtemp.c:1.28	Tue Jul 26 07:30:16 2016
+++ src/sys/dev/i2c/sdtemp.c	Tue Jul 26 08:13:57 2016
@@ -1,4 +1,4 @@
-/*      $NetBSD: sdtemp.c,v 1.28 2016/07/26 07:30:16 msaitoh Exp $        */
+/*      $NetBSD: sdtemp.c,v 1.29 2016/07/26 08:13:57 msaitoh Exp $        */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.28 2016/07/26 07:30:16 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.29 2016/07/26 08:13:57 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -607,35 +607,6 @@ sdtemp_pmf_resume(device_t dev, const pm
 	return (error == 0);
 }
 
-MODULE(MODULE_CLASS_DRIVER, sdtemp, "i2cexec,sysmon_envsys");
-
-#ifdef _MODULE
-#include "ioconf.c"
-#endif
-
-static int
-sdtemp_modcmd(modcmd_t cmd, void *opaque)
-{
-	int error = 0;
-
-	switch (cmd) {
-	case MODULE_CMD_INIT:
-#ifdef _MODULE
-		error = config_init_component(cfdriver_ioconf_sdtemp,
-		    cfattach_ioconf_sdtemp, cfdata_ioconf_sdtemp);
-#endif
-		return error;
-	case MODULE_CMD_FINI:
-#ifdef _MODULE
-		error = config_fini_component(cfdriver_ioconf_sdtemp,
-		    cfattach_ioconf_sdtemp, cfdata_ioconf_sdtemp);
-#endif
-		return error;
-	default:
-		return ENOTTY;
-	}
-}
-
 /* Device dependent config functions */
 
 static void
@@ -693,3 +664,32 @@ sdtemp_config_idt(struct sdtemp_softc *s
 		aprint_error("%s: error %d writing resolution register\n",
 		    device_xname(sc->sc_dev), rv);
 }
+
+MODULE(MODULE_CLASS_DRIVER, sdtemp, "i2cexec,sysmon_envsys");
+
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
+
+static int
+sdtemp_modcmd(modcmd_t cmd, void *opaque)
+{
+	int error = 0;
+
+	switch (cmd) {
+	case MODULE_CMD_INIT:
+#ifdef _MODULE
+		error = config_init_component(cfdriver_ioconf_sdtemp,
+		    cfattach_ioconf_sdtemp, cfdata_ioconf_sdtemp);
+#endif
+		return error;
+	case MODULE_CMD_FINI:
+#ifdef _MODULE
+		error = config_fini_component(cfdriver_ioconf_sdtemp,
+		    cfattach_ioconf_sdtemp, cfdata_ioconf_sdtemp);
+#endif
+		return error;
+	default:
+		return ENOTTY;
+	}
+}

Reply via email to