===================================================================
@@ -53,21 +53,6 @@ static int int340x_thermal_set_trip_temp
return 0;
}
-static int int340x_thermal_get_global_hyst(struct acpi_device *adev, int *temp)
-{
- acpi_status status;
- unsigned long long hyst;
-
- status = acpi_evaluate_integer(adev->handle, "GTSH", NULL, &hyst);
- if (ACPI_FAILURE(status))
- *temp = 0;
- else
- *temp = hyst * 100;
-
- return 0;
-}
-
-
static void int340x_thermal_critical(struct thermal_zone_device *zone)
{
dev_dbg(&zone->device, "%s: critical temperature reached\n", zone->type);
@@ -120,6 +105,7 @@ struct int34x_thermal_zone *int340x_ther
{
struct int34x_thermal_zone *int34x_zone;
unsigned long long trip_cnt = 0;
+ unsigned long long hyst;
int trip_mask = 0;
acpi_status status;
int i, ret;
@@ -156,8 +142,14 @@ struct int34x_thermal_zone *int340x_ther
trip_cnt = int340x_thermal_read_trips(int34x_zone);
+ status = acpi_evaluate_integer(adev->handle, "GTSH", NULL, &hyst);
+ if (ACPI_SUCCESS(status))
+ hyst *= 100;
+ else
+ hyst = 0;
+
for (i = 0; i < trip_cnt; ++i)
- int340x_thermal_get_global_hyst(adev, &int34x_zone->trips[i].hysteresis);
+ int34x_zone->trips[i].hysteresis = hyst;
for (i = 0; i < int34x_zone->aux_trip_nr; i++) {
int34x_zone->trips[i].type = THERMAL_TRIP_PASSIVE;