lkml.org 
[lkml]   [2023]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 5/6] thermal: intel: int340x: Populate auxiliary trip points first
Date
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Populate the auxiliary trip points in the int340x thermal zone before
the "regular" ACPI ones, because they occupy the initial entries of
the trip points table.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux-pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
===================================================================
--- linux-pm.orig/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
+++ linux-pm/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
@@ -142,6 +142,11 @@ struct int34x_thermal_zone *int340x_ther
goto err_trips_alloc;
}

+ for (i = 0; i < int34x_zone->aux_trip_nr; i++) {
+ int34x_zone->trips[i].type = THERMAL_TRIP_PASSIVE;
+ int34x_zone->trips[i].temperature = THERMAL_TEMP_INVALID;
+ }
+
trip_cnt = int340x_thermal_read_trips(int34x_zone);

status = acpi_evaluate_integer(adev->handle, "GTSH", NULL, &hyst);
@@ -153,11 +158,6 @@ struct int34x_thermal_zone *int340x_ther
for (i = 0; i < trip_cnt; ++i)
int34x_zone->trips[i].hysteresis = hyst;

- for (i = 0; i < int34x_zone->aux_trip_nr; i++) {
- int34x_zone->trips[i].type = THERMAL_TRIP_PASSIVE;
- int34x_zone->trips[i].temperature = THERMAL_TEMP_INVALID;
- }
-
int34x_zone->lpat_table = acpi_lpat_get_conversion_table(adev->handle);

int34x_zone->zone = thermal_zone_device_register_with_trips(


\
 
 \ /
  Last update: 2023-03-26 23:54    [W:0.051 / U:1.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site