diff options
author | Konstantin Karasyov <konstantin.a.karasyov@intel.com> | 2006-07-10 07:44:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:18 -0400 |
commit | bed936f7eab946c60170bc92a1aea597da158e02 (patch) | |
tree | 746083d8c8172dc240d4d50c91a563c1aa05944e | |
parent | 868e81b8ada8fa05bdc08b5e6fa73307caaeab6d (diff) |
[PATCH] ACPI: fix fan/thermal resume
Daniel Ritz <daniel.ritz-ml@swissonline.ch> says:
The acpi driver suspend/resume patches that went in recently caused a regression
on my box (toshiba tecra 8000 laptop): after resume from swsusp the fan turns on
keeping blowing cold air out of my notebook. before the patches, the fan was off
and would only make noise when required. it's the same thing described in
bugzilla.kernel.org #5000. the acpi suspend/resume patches or at least parts of
them originate in this bug. now the last patch in the report (attach id 8438)
actually fixes the problem - for me and the reporter. this is a trimmed down
version of that patch.
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Len Brown <len.brown@intel.com>
Cc: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/acpi/thermal.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 503c0b99db12..fdba4879603f 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -1359,13 +1359,28 @@ static int acpi_thermal_remove(struct acpi_device *device, int type) | |||
1359 | static int acpi_thermal_resume(struct acpi_device *device, int state) | 1359 | static int acpi_thermal_resume(struct acpi_device *device, int state) |
1360 | { | 1360 | { |
1361 | struct acpi_thermal *tz = NULL; | 1361 | struct acpi_thermal *tz = NULL; |
1362 | int i; | ||
1362 | 1363 | ||
1363 | if (!device || !acpi_driver_data(device)) | 1364 | if (!device || !acpi_driver_data(device)) |
1364 | return -EINVAL; | 1365 | return -EINVAL; |
1365 | 1366 | ||
1366 | tz = (struct acpi_thermal *)acpi_driver_data(device); | 1367 | tz = (struct acpi_thermal *)acpi_driver_data(device); |
1367 | 1368 | ||
1368 | acpi_thermal_check(tz); | 1369 | acpi_thermal_get_temperature(tz); |
1370 | |||
1371 | for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) { | ||
1372 | if (tz->trips.active[i].flags.valid) { | ||
1373 | tz->temperature = tz->trips.active[i].temperature; | ||
1374 | tz->trips.active[i].flags.enabled = 0; | ||
1375 | |||
1376 | acpi_thermal_active(tz); | ||
1377 | |||
1378 | tz->state.active |= tz->trips.active[i].flags.enabled; | ||
1379 | tz->state.active_index = i; | ||
1380 | } | ||
1381 | } | ||
1382 | |||
1383 | acpi_thermal_check(tz); | ||
1369 | 1384 | ||
1370 | return AE_OK; | 1385 | return AE_OK; |
1371 | } | 1386 | } |