Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c Move functions to make module related code at th...
details: https://anonhg.NetBSD.org/src/rev/0d923a297bd8
branches: trunk
changeset: 346666:0d923a297bd8
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jul 26 08:13:57 2016 +0000
description:
Move functions to make module related code at the bottom of this file.
diffstat:
sys/dev/i2c/sdtemp.c | 62 ++++++++++++++++++++++++++--------------------------
1 files changed, 31 insertions(+), 31 deletions(-)
diffs (87 lines):
diff -r b4343ee0a3b5 -r 0d923a297bd8 sys/dev/i2c/sdtemp.c
--- a/sys/dev/i2c/sdtemp.c Tue Jul 26 08:05:51 2016 +0000
+++ b/sys/dev/i2c/sdtemp.c Tue Jul 26 08:13:57 2016 +0000
@@ -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 @@
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 @@
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;
+ }
+}
Home |
Main Index |
Thread Index |
Old Index