From dbad09ef38df6f5114cc3ca8e40e79f6e2f14d66 Mon Sep 17 00:00:00 2001 From: Mitsuru IWASAKI Date: Tue, 4 Sep 2001 15:40:12 +0000 Subject: [PATCH] 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 --- sys/dev/acpica/acpi_thermal.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c index c46b2bd0193..6a8337c3ae4 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])); + } } }