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>
return -ENODEV;
}
- tz->tz_enabled = 1;
-
dev_info(&tz->device->dev, "registered as thermal_zone%d\n",
tz->thermal_zone->id);
return 0;
return -ENOMEM;
tz->device = device;
+ tz->tz_enabled = 1;
strcpy(tz->name, device->pnp.bus_id);
strcpy(acpi_device_name(device), ACPI_THERMAL_DEVICE_NAME);
strcpy(acpi_device_class(device), ACPI_THERMAL_CLASS);