diff options
Diffstat (limited to 'drivers/acpi')
-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 | } |