@@ -82,7 +82,7 @@ MODULE_PARM_DESC(psv, "Disable or override all passive trip points.");
82
82
static struct workqueue_struct * acpi_thermal_pm_queue ;
83
83
84
84
struct acpi_thermal_trip {
85
- unsigned long temperature ;
85
+ unsigned long temp_dk ;
86
86
struct acpi_handle_list devices ;
87
87
};
88
88
@@ -105,8 +105,8 @@ struct acpi_thermal_trips {
105
105
struct acpi_thermal {
106
106
struct acpi_device * device ;
107
107
acpi_bus_id name ;
108
- unsigned long temperature ;
109
- unsigned long last_temperature ;
108
+ unsigned long temp_dk ;
109
+ unsigned long last_temp_dk ;
110
110
unsigned long polling_frequency ;
111
111
volatile u8 zombie ;
112
112
struct acpi_thermal_trips trips ;
@@ -131,16 +131,16 @@ static int acpi_thermal_get_temperature(struct acpi_thermal *tz)
131
131
if (!tz )
132
132
return - EINVAL ;
133
133
134
- tz -> last_temperature = tz -> temperature ;
134
+ tz -> last_temp_dk = tz -> temp_dk ;
135
135
136
136
status = acpi_evaluate_integer (tz -> device -> handle , "_TMP" , NULL , & tmp );
137
137
if (ACPI_FAILURE (status ))
138
138
return - ENODEV ;
139
139
140
- tz -> temperature = tmp ;
140
+ tz -> temp_dk = tmp ;
141
141
142
142
acpi_handle_debug (tz -> device -> handle , "Temperature is %lu dK\n" ,
143
- tz -> temperature );
143
+ tz -> temp_dk );
144
144
145
145
return 0 ;
146
146
}
@@ -175,7 +175,7 @@ static int acpi_thermal_temp(struct acpi_thermal *tz, int temp_deci_k)
175
175
176
176
static bool acpi_thermal_trip_valid (struct acpi_thermal_trip * acpi_trip )
177
177
{
178
- return acpi_trip -> temperature != THERMAL_TEMP_INVALID ;
178
+ return acpi_trip -> temp_dk != THERMAL_TEMP_INVALID ;
179
179
}
180
180
181
181
static long get_passive_temp (struct acpi_thermal * tz )
@@ -197,7 +197,7 @@ static void acpi_thermal_update_passive_trip(struct acpi_thermal *tz)
197
197
if (!acpi_thermal_trip_valid (acpi_trip ) || psv > 0 )
198
198
return ;
199
199
200
- acpi_trip -> temperature = get_passive_temp (tz );
200
+ acpi_trip -> temp_dk = get_passive_temp (tz );
201
201
if (!acpi_thermal_trip_valid (acpi_trip ))
202
202
ACPI_THERMAL_TRIPS_EXCEPTION (tz , "state" );
203
203
}
@@ -244,7 +244,7 @@ static void acpi_thermal_update_trip_devices(struct acpi_thermal *tz, int index)
244
244
return ;
245
245
}
246
246
247
- acpi_trip -> temperature = THERMAL_TEMP_INVALID ;
247
+ acpi_trip -> temp_dk = THERMAL_TEMP_INVALID ;
248
248
ACPI_THERMAL_TRIPS_EXCEPTION (tz , "state" );
249
249
}
250
250
@@ -278,7 +278,7 @@ static void acpi_thermal_update_active_trip(struct acpi_thermal *tz, int index)
278
278
if (!acpi_thermal_trip_valid (acpi_trip ))
279
279
return ;
280
280
281
- acpi_trip -> temperature = get_active_temp (tz , index );
281
+ acpi_trip -> temp_dk = get_active_temp (tz , index );
282
282
if (!acpi_thermal_trip_valid (acpi_trip ))
283
283
ACPI_THERMAL_TRIPS_EXCEPTION (tz , "state" );
284
284
}
@@ -292,7 +292,7 @@ static int acpi_thermal_adjust_trip(struct thermal_trip *trip, void *data)
292
292
return 0 ;
293
293
294
294
if (acpi_thermal_trip_valid (acpi_trip ))
295
- trip -> temperature = acpi_thermal_temp (tz , acpi_trip -> temperature );
295
+ trip -> temperature = acpi_thermal_temp (tz , acpi_trip -> temp_dk );
296
296
else
297
297
trip -> temperature = THERMAL_TEMP_INVALID ;
298
298
@@ -447,11 +447,11 @@ static bool acpi_thermal_init_trip(struct acpi_thermal *tz, int index)
447
447
if (!update_trip_devices (tz , acpi_trip , index , false))
448
448
goto fail ;
449
449
450
- acpi_trip -> temperature = temp ;
450
+ acpi_trip -> temp_dk = temp ;
451
451
return true;
452
452
453
453
fail :
454
- acpi_trip -> temperature = THERMAL_TEMP_INVALID ;
454
+ acpi_trip -> temp_dk = THERMAL_TEMP_INVALID ;
455
455
return false;
456
456
}
457
457
@@ -472,7 +472,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
472
472
}
473
473
474
474
while (++ i < ACPI_THERMAL_MAX_ACTIVE )
475
- tz -> trips .active [i ].trip .temperature = THERMAL_TEMP_INVALID ;
475
+ tz -> trips .active [i ].trip .temp_dk = THERMAL_TEMP_INVALID ;
476
476
477
477
return count ;
478
478
}
@@ -491,7 +491,7 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp)
491
491
if (result )
492
492
return result ;
493
493
494
- * temp = deci_kelvin_to_millicelsius_with_offset (tz -> temperature ,
494
+ * temp = deci_kelvin_to_millicelsius_with_offset (tz -> temp_dk ,
495
495
tz -> kelvin_offset );
496
496
return 0 ;
497
497
}
@@ -513,10 +513,10 @@ static int thermal_get_trend(struct thermal_zone_device *thermal,
513
513
514
514
switch (trip -> type ) {
515
515
case THERMAL_TRIP_PASSIVE :
516
- t = tz -> trips .passive .tc1 * (tz -> temperature -
517
- tz -> last_temperature ) +
518
- tz -> trips .passive .tc2 * (tz -> temperature -
519
- acpi_trip -> temperature );
516
+ t = tz -> trips .passive .tc1 * (tz -> temp_dk -
517
+ tz -> last_temp_dk ) +
518
+ tz -> trips .passive .tc2 * (tz -> temp_dk -
519
+ acpi_trip -> temp_dk );
520
520
if (t > 0 )
521
521
* trend = THERMAL_TREND_RAISING ;
522
522
else if (t < 0 )
@@ -527,7 +527,7 @@ static int thermal_get_trend(struct thermal_zone_device *thermal,
527
527
return 0 ;
528
528
529
529
case THERMAL_TRIP_ACTIVE :
530
- t = acpi_thermal_temp (tz , tz -> temperature );
530
+ t = acpi_thermal_temp (tz , tz -> temp_dk );
531
531
if (t <= trip -> temperature )
532
532
break ;
533
533
@@ -899,7 +899,7 @@ static int acpi_thermal_add(struct acpi_device *device)
899
899
passive_delay = tz -> trips .passive .tsp * 100 ;
900
900
901
901
trip -> type = THERMAL_TRIP_PASSIVE ;
902
- trip -> temperature = acpi_thermal_temp (tz , acpi_trip -> temperature );
902
+ trip -> temperature = acpi_thermal_temp (tz , acpi_trip -> temp_dk );
903
903
trip -> priv = acpi_trip ;
904
904
trip ++ ;
905
905
}
@@ -911,7 +911,7 @@ static int acpi_thermal_add(struct acpi_device *device)
911
911
break ;
912
912
913
913
trip -> type = THERMAL_TRIP_ACTIVE ;
914
- trip -> temperature = acpi_thermal_temp (tz , acpi_trip -> temperature );
914
+ trip -> temperature = acpi_thermal_temp (tz , acpi_trip -> temp_dk );
915
915
trip -> priv = acpi_trip ;
916
916
trip ++ ;
917
917
}
@@ -925,7 +925,7 @@ static int acpi_thermal_add(struct acpi_device *device)
925
925
INIT_WORK (& tz -> thermal_check_work , acpi_thermal_check_fn );
926
926
927
927
pr_info ("%s [%s] (%ld C)\n" , acpi_device_name (device ),
928
- acpi_device_bid (device ), deci_kelvin_to_celsius (tz -> temperature ));
928
+ acpi_device_bid (device ), deci_kelvin_to_celsius (tz -> temp_dk ));
929
929
930
930
result = acpi_dev_install_notify_handler (device , ACPI_DEVICE_NOTIFY ,
931
931
acpi_thermal_notify );
0 commit comments