acpi: thermal: initialize tz_enabled to 1
authorSameer Nanda <snanda@chromium.org>
Tue, 30 Oct 2012 18:50:34 +0000 (11:50 -0700)
committerGerrit <chrome-bot@google.com>
Tue, 30 Oct 2012 21:06:49 +0000 (14:06 -0700)
commit93ff3493be0a6562006a1bd7b56d12638a6b4705
tree56d110278d245285b5971e27eda3bf72fc15da45
parent7bcec1a67784ef08b6496e0754a865ba278bebcf
acpi: thermal: initialize tz_enabled to 1

In the acpi_thermal_add path, acpi_thermal_get_info gets called before
acpi_thermal_register_thermal_zone.  Since tz_enabled was getting set to
1 only in acpi_thermal_register_thermal_zone, acpi_thermal_get_info
ended up disabling thermal polling.

Moved setting of tz_enabled to 1 into acpi_thermal_add itself.

BUG=chrome-os-partner:15697
TEST=on kiev, run CPU soaker threads ("while true; do true; done") and ensure
that the fan turns on as the CPU heats up.

Change-Id: Ib2ad69621ce32f252a8b913387e1560d0750b822
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36927
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
drivers/acpi/thermal.c