Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/dev Initialize sensor states before registering
details: https://anonhg.NetBSD.org/src/rev/4852a0de5b62
branches: trunk
changeset: 766311:4852a0de5b62
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Jun 20 16:33:42 2011 +0000
description:
Initialize sensor states before registering
diffstat:
sys/arch/sparc/dev/tctrl.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r ec9ae6614ac3 -r 4852a0de5b62 sys/arch/sparc/dev/tctrl.c
--- a/sys/arch/sparc/dev/tctrl.c Mon Jun 20 16:31:28 2011 +0000
+++ b/sys/arch/sparc/dev/tctrl.c Mon Jun 20 16:33:42 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tctrl.c,v 1.50 2009/11/21 04:16:51 rmind Exp $ */
+/* $NetBSD: tctrl.c,v 1.51 2011/06/20 16:33:42 pgoyette Exp $ */
/*-
* Copyright (c) 1998, 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.50 2009/11/21 04:16:51 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tctrl.c,v 1.51 2011/06/20 16:33:42 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1261,16 +1261,19 @@
(void)strlcpy(sc->sc_sensor[0].desc, "Case temperature",
sizeof(sc->sc_sensor[0].desc));
sc->sc_sensor[0].units = ENVSYS_STEMP;
+ sc->sc_sensor[0].state = ENVSYS_SINVALID;
/* battery voltage */
(void)strlcpy(sc->sc_sensor[1].desc, "Internal battery voltage",
sizeof(sc->sc_sensor[1].desc));
sc->sc_sensor[1].units = ENVSYS_SVOLTS_DC;
+ sc->sc_sensor[1].state = ENVSYS_SINVALID;
/* DC voltage */
(void)strlcpy(sc->sc_sensor[2].desc, "DC-In voltage",
sizeof(sc->sc_sensor[2].desc));
sc->sc_sensor[2].units = ENVSYS_SVOLTS_DC;
+ sc->sc_sensor[2].state = ENVSYS_SINVALID;
for (i = 0; i < ENVSYS_NUMSENSORS; i++) {
if (sysmon_envsys_sensor_attach(sc->sc_sme,
Home |
Main Index |
Thread Index |
Old Index