Initialize sensor's state

on behalf of xtraeme
This commit is contained in:
kefren 2007-11-17 08:30:35 +00:00
parent c61259ee1f
commit 7ff1853b95
5 changed files with 15 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu_subr.c,v 1.34 2007/11/16 08:00:12 xtraeme Exp $ */
/* $NetBSD: cpu_subr.c,v 1.35 2007/11/17 08:30:35 kefren Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.34 2007/11/16 08:00:12 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.35 2007/11/17 08:30:35 kefren Exp $");
#include "opt_ppcparam.h"
#include "opt_multiprocessor.h"
@ -893,6 +893,7 @@ cpu_tau_setup(struct cpu_info *ci)
sme = sysmon_envsys_create();
sensor.state = ENVSYS_SVALID;
sensor.units = ENVSYS_STEMP;
(void)strlcpy(sensor.desc, "CPU Temp", sizeof(sensor.desc));
if (sysmon_envsys_sensor_attach(sme, &sensor)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: adm1030.c,v 1.10 2007/11/16 08:00:13 xtraeme Exp $ */
/* $NetBSD: adm1030.c,v 1.11 2007/11/17 08:30:35 kefren Exp $ */
/*-
* Copyright (C) 2005 Michael Lorenz.
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: adm1030.c,v 1.10 2007/11/16 08:00:13 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: adm1030.c,v 1.11 2007/11/17 08:30:35 kefren Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -265,5 +265,6 @@ adm1030c_refresh(struct sysmon_envsys *sme, envsys_data_t *edata)
}
break;
}
edata->state = ENVSYS_SVALID;
}
#endif /* NSYSMON_ENVSYS > 0 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: adt7467.c,v 1.9 2007/11/16 08:00:14 xtraeme Exp $ */
/* $NetBSD: adt7467.c,v 1.10 2007/11/17 08:30:35 kefren Exp $ */
/*-
* Copyright (C) 2005 Michael Lorenz
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: adt7467.c,v 1.9 2007/11/16 08:00:14 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: adt7467.c,v 1.10 2007/11/17 08:30:35 kefren Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -289,5 +289,6 @@ adt7467c_refresh(struct sysmon_envsys *sme, envsys_data_t *edata)
}
break;
}
edata->state = ENVSYS_SVALID;
}
#endif /* NSYSMON_ENVSYS > 0 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: aps.c,v 1.3 2007/11/16 08:00:15 xtraeme Exp $ */
/* $NetBSD: aps.c,v 1.4 2007/11/17 08:30:35 kefren Exp $ */
/* $OpenBSD: aps.c,v 1.15 2007/05/19 19:14:11 tedu Exp $ */
/*
@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aps.c,v 1.3 2007/11/16 08:00:15 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: aps.c,v 1.4 2007/11/17 08:30:35 kefren Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -231,6 +231,7 @@ aps_attach(struct device *parent, struct device *self, void *aux)
sc->sc_sme = sysmon_envsys_create();
for (i = 0; i < APS_NUM_SENSORS; i++) {
sc->sc_sensor[i].state = ENVSYS_SVALID;
if (sysmon_envsys_sensor_attach(sc->sc_sme,
&sc->sc_sensor[i])) {
sysmon_envsys_destroy(sc->sc_sme);

View File

@ -1,4 +1,4 @@
/* $NetBSD: smsc.c,v 1.5 2007/11/16 08:00:15 xtraeme Exp $ */
/* $NetBSD: smsc.c,v 1.6 2007/11/17 08:30:35 kefren Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: smsc.c,v 1.5 2007/11/16 08:00:15 xtraeme Exp $");
__KERNEL_RCSID(0, "$NetBSD: smsc.c,v 1.6 2007/11/17 08:30:35 kefren Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -371,4 +371,5 @@ smsc_refresh(struct sysmon_envsys *sme, envsys_data_t *edata)
edata->value_cur = smsc_reg2rpm(rpm);
break;
}
edata->state = ENVSYS_SVALID;
}