mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
ACPI: thermal: Fix acpi_thermal_guess_offset() for device with a 273.0°K offset
Some devices round the 273.15° offset between Kelvin and Celsius to 273.0 instead of 273.1 or 273.2. Make acpi_thermal_guess_offset() check for this value too, fixing e.g. all zones reporting x.8°C to them reporting y.0°C instead. Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Link: https://patch.msgid.link/20260919123131.11443-1-johannes.goede@oss.qualcomm.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
cc695a6745
commit
ca38d128b6
|
|
@ -741,7 +741,9 @@ static void acpi_thermal_aml_dependency_fix(struct acpi_thermal *tz)
|
|||
*/
|
||||
static void acpi_thermal_guess_offset(struct acpi_thermal *tz, long crit_temp)
|
||||
{
|
||||
if (crit_temp != THERMAL_TEMP_INVALID && crit_temp % 5 == 1)
|
||||
if (crit_temp != THERMAL_TEMP_INVALID && crit_temp % 5 == 0)
|
||||
tz->kelvin_offset = 273000;
|
||||
else if (crit_temp != THERMAL_TEMP_INVALID && crit_temp % 5 == 1)
|
||||
tz->kelvin_offset = 273100;
|
||||
else
|
||||
tz->kelvin_offset = 273200;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user