Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/i2c Initialize sensor states to SINVALID



details:   https://anonhg.NetBSD.org/src/rev/cdb91d0da443
branches:  trunk
changeset: 766252:cdb91d0da443
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jun 19 11:44:03 2011 +0000

description:
Initialize sensor states to SINVALID

diffstat:

 sys/dev/i2c/adm1021.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 00fe6dfc5036 -r cdb91d0da443 sys/dev/i2c/adm1021.c
--- a/sys/dev/i2c/adm1021.c     Sun Jun 19 11:40:26 2011 +0000
+++ b/sys/dev/i2c/adm1021.c     Sun Jun 19 11:44:03 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adm1021.c,v 1.5 2010/03/11 04:19:55 mrg Exp $ */
+/*     $NetBSD: adm1021.c,v 1.6 2011/06/19 11:44:03 martin Exp $ */
 /*     $OpenBSD: adm1021.c,v 1.27 2007/06/24 05:34:35 dlg Exp $        */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.5 2010/03/11 04:19:55 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.6 2011/06/19 11:44:03 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -153,7 +153,9 @@
        iic_release_bus(sc->sc_tag, 0);
 
        /* Initialize sensor data. */
+       sc->sc_sensor[ADMTEMP_INT].state = ENVSYS_SINVALID;
        sc->sc_sensor[ADMTEMP_INT].units = ENVSYS_STEMP;
+       sc->sc_sensor[ADMTEMP_EXT].state = ENVSYS_SINVALID;
        sc->sc_sensor[ADMTEMP_EXT].units = ENVSYS_STEMP;
        strlcpy(sc->sc_sensor[ADMTEMP_INT].desc, "internal",sizeof("internal"));
        strlcpy(sc->sc_sensor[ADMTEMP_EXT].desc, "external",sizeof("external"));



Home | Main Index | Thread Index | Old Index