summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-09-21 18:39:10 +0000
committernjl <njl@FreeBSD.org>2004-09-21 18:39:10 +0000
commit168f1a937f7ee05bd260816130e8771ebf99ba51 (patch)
tree3c7928c1e037402e6607dbe421294e86a3a004d0 /sys/dev/acpica
parentd59f3ddc7ea91ec5bc72e870a973557c2ca5d5d1 (diff)
downloadFreeBSD-src-168f1a937f7ee05bd260816130e8771ebf99ba51.zip
FreeBSD-src-168f1a937f7ee05bd260816130e8771ebf99ba51.tar.gz
Initialize the flags value properly. We used to do this in acpi_tz_all_off()
but that function has been removed. This avoids a potential unnecessary fan switch on boot. Also remove some commented out code. MFC after: 3 days
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_thermal.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
index 6b65f88..f936cd9 100644
--- a/sys/dev/acpica/acpi_thermal.c
+++ b/sys/dev/acpica/acpi_thermal.c
@@ -112,9 +112,6 @@ static int acpi_tz_probe(device_t dev);
static int acpi_tz_attach(device_t dev);
static int acpi_tz_establish(struct acpi_tz_softc *sc);
static void acpi_tz_monitor(void *Context);
-#if 0
-static void acpi_tz_all_off(struct acpi_tz_softc *sc);
-#endif
static void acpi_tz_switch_cooler_off(ACPI_OBJECT *obj, void *arg);
static void acpi_tz_switch_cooler_on(ACPI_OBJECT *obj, void *arg);
static void acpi_tz_getparam(struct acpi_tz_softc *sc, char *node,
@@ -184,6 +181,8 @@ acpi_tz_attach(device_t dev)
sc->tz_dev = dev;
sc->tz_handle = acpi_get_handle(dev);
sc->tz_requested = TZ_ACTIVE_NONE;
+ sc->tz_active = TZ_ACTIVE_NONE;
+ sc->tz_thflags = TZ_THFLAG_NONE;
/*
* Parse the current state of the thermal zone and build control
@@ -487,36 +486,6 @@ acpi_tz_monitor(void *Context)
return_VOID;
}
-#if 0
-/*
- * Turn off all the cooling devices.
- */
-static void
-acpi_tz_all_off(struct acpi_tz_softc *sc)
-{
- int i;
-
- ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
-
- /* Scan all the _ALx objects and turn them all off. */
- for (i = 0; i < TZ_NUMLEVELS; i++) {
- if (sc->tz_zone.al[i].Pointer == NULL)
- continue;
- acpi_ForeachPackageObject((ACPI_OBJECT *)sc->tz_zone.al[i].Pointer,
- acpi_tz_switch_cooler_off, sc);
- }
-
- /*
- * XXX revert any passive-cooling options.
- */
-
- sc->tz_active = TZ_ACTIVE_NONE;
- sc->tz_thflags = TZ_THFLAG_NONE;
-
- return_VOID;
-}
-#endif
-
/*
* Given an object, verify that it's a reference to a device of some sort,
* and try to switch it off.
OpenPOWER on IntegriCloud