From e8e509df6d3b60ad9db814489a00c73edd46e9d0 Mon Sep 17 00:00:00 2001 From: Konstantin Karasyov Date: Mon, 10 Jul 2006 04:44:26 -0700 Subject: [PATCH] --- yaml --- r: 32250 b: refs/heads/master c: bed936f7eab946c60170bc92a1aea597da158e02 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/acpi/thermal.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 8c13e6f71995..b499838dd509 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 868e81b8ada8fa05bdc08b5e6fa73307caaeab6d +refs/heads/master: bed936f7eab946c60170bc92a1aea597da158e02 diff --git a/trunk/drivers/acpi/thermal.c b/trunk/drivers/acpi/thermal.c index 503c0b99db12..fdba4879603f 100644 --- a/trunk/drivers/acpi/thermal.c +++ b/trunk/drivers/acpi/thermal.c @@ -1359,13 +1359,28 @@ static int acpi_thermal_remove(struct acpi_device *device, int type) static int acpi_thermal_resume(struct acpi_device *device, int state) { struct acpi_thermal *tz = NULL; + int i; if (!device || !acpi_driver_data(device)) return -EINVAL; tz = (struct acpi_thermal *)acpi_driver_data(device); - acpi_thermal_check(tz); + acpi_thermal_get_temperature(tz); + + for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) { + if (tz->trips.active[i].flags.valid) { + tz->temperature = tz->trips.active[i].temperature; + tz->trips.active[i].flags.enabled = 0; + + acpi_thermal_active(tz); + + tz->state.active |= tz->trips.active[i].flags.enabled; + tz->state.active_index = i; + } + } + + acpi_thermal_check(tz); return AE_OK; }