Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi Initialize sensors states before registering.
details: https://anonhg.NetBSD.org/src/rev/5a2fdd632927
branches: trunk
changeset: 766315:5a2fdd632927
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Jun 20 17:21:50 2011 +0000
description:
Initialize sensors states before registering.
diffstat:
sys/dev/acpi/acpi_fan.c | 5 +++--
sys/dev/acpi/acpi_pmtr.c | 6 ++++--
sys/dev/acpi/acpi_tz.c | 6 ++++--
sys/dev/acpi/aibs_acpi.c | 5 +++--
4 files changed, 14 insertions(+), 8 deletions(-)
diffs (113 lines):
diff -r 20d9dc237c6c -r 5a2fdd632927 sys/dev/acpi/acpi_fan.c
--- a/sys/dev/acpi/acpi_fan.c Mon Jun 20 17:15:38 2011 +0000
+++ b/sys/dev/acpi/acpi_fan.c Mon Jun 20 17:21:50 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_fan.c,v 1.4 2011/02/16 09:05:12 jruoho Exp $ */
+/* $NetBSD: acpi_fan.c,v 1.5 2011/06/20 17:21:50 pgoyette Exp $ */
/*-
* Copyright (c) 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_fan.c,v 1.4 2011/02/16 09:05:12 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_fan.c,v 1.5 2011/06/20 17:21:50 pgoyette Exp $");
#include <sys/param.h>
#include <sys/module.h>
@@ -172,6 +172,7 @@
acpifan_sensor_state(self);
sc->sc_sensor.units = ENVSYS_INDICATOR;
+ sc->sc_sensor.state = ENVSYS_SINVALID;
(void)strlcpy(sc->sc_sensor.desc, "state", sizeof(sc->sc_sensor.desc));
diff -r 20d9dc237c6c -r 5a2fdd632927 sys/dev/acpi/acpi_pmtr.c
--- a/sys/dev/acpi/acpi_pmtr.c Mon Jun 20 17:15:38 2011 +0000
+++ b/sys/dev/acpi/acpi_pmtr.c Mon Jun 20 17:21:50 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pmtr.c,v 1.4 2011/06/03 18:50:36 jruoho Exp $ */
+/* $NetBSD: acpi_pmtr.c,v 1.5 2011/06/20 17:21:50 pgoyette Exp $ */
/*-
* Copyright (c) 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_pmtr.c,v 1.4 2011/06/03 18:50:36 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pmtr.c,v 1.5 2011/06/20 17:21:50 pgoyette Exp $");
#include <sys/param.h>
#include <sys/module.h>
@@ -338,6 +338,8 @@
sc->sc_sensor_o.units = ENVSYS_SWATTS;
sc->sc_sensor_i.value_cur = val * 1000;
sc->sc_sensor_o.value_cur = val * 1000;
+ sc->sc_sensor_i.state = ENVSYS_SINVALID;
+ sc->sc_sensor_o.state = ENVSYS_SINVALID;
acpipmtr_sensor_type(self);
diff -r 20d9dc237c6c -r 5a2fdd632927 sys/dev/acpi/acpi_tz.c
--- a/sys/dev/acpi/acpi_tz.c Mon Jun 20 17:15:38 2011 +0000
+++ b/sys/dev/acpi/acpi_tz.c Mon Jun 20 17:21:50 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.81 2011/06/20 15:36:49 jruoho Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.82 2011/06/20 17:21:50 pgoyette Exp $ */
/*
* Copyright (c) 2003 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.81 2011/06/20 15:36:49 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.82 2011/06/20 17:21:50 pgoyette Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -774,6 +774,7 @@
sc->sc_temp_sensor.flags = flags;
sc->sc_temp_sensor.units = ENVSYS_STEMP;
+ sc->sc_temp_sensor.state = ENVSYS_SINVALID;
(void)strlcpy(sc->sc_temp_sensor.desc, "temperature",
sizeof(sc->sc_temp_sensor.desc));
@@ -785,6 +786,7 @@
sc->sc_fan_sensor.flags = flags;
sc->sc_fan_sensor.units = ENVSYS_SFANRPM;
+ sc->sc_fan_sensor.state = ENVSYS_SINVALID;
(void)strlcpy(sc->sc_fan_sensor.desc,
"FAN", sizeof(sc->sc_fan_sensor.desc));
diff -r 20d9dc237c6c -r 5a2fdd632927 sys/dev/acpi/aibs_acpi.c
--- a/sys/dev/acpi/aibs_acpi.c Mon Jun 20 17:15:38 2011 +0000
+++ b/sys/dev/acpi/aibs_acpi.c Mon Jun 20 17:21:50 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aibs_acpi.c,v 1.1 2011/06/12 07:25:43 jruoho Exp $ */
+/* $NetBSD: aibs_acpi.c,v 1.2 2011/06/20 17:21:50 pgoyette Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aibs_acpi.c,v 1.1 2011/06/12 07:25:43 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aibs_acpi.c,v 1.2 2011/06/20 17:21:50 pgoyette Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -465,6 +465,7 @@
}
(void)strlcpy(as->as_sensor.desc, name, sizeof(as->as_sensor.desc));
+ as->as_sensor.state = ENVSYS_SINVALID;
if (sysmon_envsys_sensor_attach(sc->sc_sme, &as->as_sensor) != 0) {
rv = AE_AML_INTERNAL;
Home |
Main Index |
Thread Index |
Old Index