Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/onewire Initialize sensor state before registering.



details:   https://anonhg.NetBSD.org/src/rev/34b77cc2884e
branches:  trunk
changeset: 766316:34b77cc2884e
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Jun 20 17:24:16 2011 +0000

description:
Initialize sensor state before registering.

diffstat:

 sys/dev/onewire/owtemp.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 5a2fdd632927 -r 34b77cc2884e sys/dev/onewire/owtemp.c
--- a/sys/dev/onewire/owtemp.c  Mon Jun 20 17:21:50 2011 +0000
+++ b/sys/dev/onewire/owtemp.c  Mon Jun 20 17:24:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: owtemp.c,v 1.15 2009/12/06 22:49:48 dyoung Exp $ */
+/*     $NetBSD: owtemp.c,v 1.16 2011/06/20 17:24:16 pgoyette Exp $ */
 /*     $OpenBSD: owtemp.c,v 1.1 2006/03/04 16:27:03 grange Exp $       */
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: owtemp.c,v 1.15 2009/12/06 22:49:48 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: owtemp.c,v 1.16 2011/06/20 17:24:16 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -106,6 +106,7 @@
 
        /* Initialize sensor */
        sc->sc_sensor.units = ENVSYS_STEMP;
+       sc->sc_sensor.state = ENVSYS_SINVALID;
        (void)strlcpy(sc->sc_sensor.desc,
            device_xname(self), sizeof(sc->sc_sensor.desc));
        if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_sensor)) {



Home | Main Index | Thread Index | Old Index