Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/4d8544801681
branches:  trunk
changeset: 766318:4d8544801681
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Jun 20 17:31:37 2011 +0000

description:
Initialize sensor state before registering

diffstat:

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

diffs (26 lines):

diff -r 513a957d9bba -r 4d8544801681 sys/dev/spi/tmp121.c
--- a/sys/dev/spi/tmp121.c      Mon Jun 20 17:29:06 2011 +0000
+++ b/sys/dev/spi/tmp121.c      Mon Jun 20 17:31:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmp121.c,v 1.4 2008/04/04 10:13:59 xtraeme Exp $ */
+/* $NetBSD: tmp121.c,v 1.5 2011/06/20 17:31:37 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmp121.c,v 1.4 2008/04/04 10:13:59 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmp121.c,v 1.5 2011/06/20 17:31:37 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -93,6 +93,7 @@
 
        sc->sc_sme = sysmon_envsys_create();
        sc->sc_sensor.units = ENVSYS_STEMP;
+       sc->sc_sensor.state = ENVSYS_SINVALID;
        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