summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_thermal.c
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2001-09-04 15:40:12 +0000
committeriwasaki <iwasaki@FreeBSD.org>2001-09-04 15:40:12 +0000
commita19dd226fc5e9a0264c32e9ff837822450fa9353 (patch)
treedf0193dcdca26aa303ea3911f92fb960133b86fd /sys/dev/acpica/acpi_thermal.c
parent7ffd260ead4cf01d20a68cf139ee0cfd8c707ade (diff)
downloadFreeBSD-src-a19dd226fc5e9a0264c32e9ff837822450fa9353.zip
FreeBSD-src-a19dd226fc5e9a0264c32e9ff837822450fa9353.tar.gz
Just print a message in acpi_tz_monitor() only when new active state
is different from the previous active state. This reduce tons of 'acpi_tz0: _AC0: temperature 64.0 >= setpoint 64.0' messages. Reviewed by: msmith
Diffstat (limited to 'sys/dev/acpica/acpi_thermal.c')
-rw-r--r--sys/dev/acpica/acpi_thermal.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
index c46b2bd..6a8337c 100644
--- a/sys/dev/acpica/acpi_thermal.c
+++ b/sys/dev/acpica/acpi_thermal.c
@@ -357,9 +357,12 @@ acpi_tz_monitor(struct acpi_tz_softc *sc)
newactive = TZ_ACTIVE_NONE;
for (i = TZ_NUMLEVELS - 1; i >= 0; i--) {
if ((sc->tz_zone.ac[i] != -1) && (temp >= sc->tz_zone.ac[i])) {
- device_printf(sc->tz_dev, "_AC%d: temperature %d > setpoint %d\n",
- i, temp, sc->tz_zone.ac[i]);
newactive = i;
+ if (sc->tz_active != newactive) {
+ device_printf(sc->tz_dev,
+ "_AC%d: temperature %d.%d >= setpoint %d.%d\n", i,
+ TZ_KELVTOC(temp), TZ_KELVTOC(sc->tz_zone.ac[i]));
+ }
}
}
OpenPOWER on IntegriCloud