diff options
author | Nate Lawson <njl@FreeBSD.org> | 2004-09-21 18:39:10 +0000 |
---|---|---|
committer | Nate Lawson <njl@FreeBSD.org> | 2004-09-21 18:39:10 +0000 |
commit | 95c973ff5291e7e1cfe8c0d3d26f90b89d6130c2 (patch) | |
tree | 3c7928c1e037402e6607dbe421294e86a3a004d0 | |
parent | 2cbbf9dac9829e7e3d2e1f150dc78901b67829ae (diff) |
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
Notes
Notes:
svn path=/head/; revision=135548
-rw-r--r-- | sys/dev/acpica/acpi_thermal.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c index 6b65f8881392..f936cd9d51f6 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. |