diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-09-19 20:54:37 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-09-25 11:46:19 +0200 |
commit | 950210887670cbb7d2eb9af6fb743b70f1a1ebdc (patch) | |
tree | a9b81204e30e36e8e37f69b89622eaea8a4c364d /include/linux/thermal.h | |
parent | 6465e260f48790807eef06b583b38ca9789b6072 (diff) | |
download | lwn-950210887670cbb7d2eb9af6fb743b70f1a1ebdc.tar.gz lwn-950210887670cbb7d2eb9af6fb743b70f1a1ebdc.zip |
thermal: core: Drop trips_disabled bitmask
After recent changes, thermal_zone_get_trip() cannot fail, as invoked
from thermal_zone_device_register_with_trips(), so the only role of
the trips_disabled bitmask is struct thermal_zone_device is to make
handle_thermal_trip() skip trip points whose temperature was initially
zero. However, since the unit of temperature in the thermal core is
millicelsius, zero may very well be a valid temperature value at least
in some usage scenarios and the trip temperature may as well change
later. Thus there is no reason to permanently disable trip points
with initial temperature equal to zero.
Accordingly, drop the trips_disabled bitmask along with the code
related to it.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r-- | include/linux/thermal.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index a5ae4af955ff..6cfcae22ba12 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -122,7 +122,6 @@ struct thermal_cooling_device { * @devdata: private pointer for device private data * @trips: an array of struct thermal_trip * @num_trips: number of trip points the thermal zone supports - * @trips_disabled; bitmap for disabled trips * @passive_delay_jiffies: number of jiffies to wait between polls when * performing passive cooling. * @polling_delay_jiffies: number of jiffies to wait between polls when @@ -163,7 +162,6 @@ struct thermal_zone_device { void *devdata; struct thermal_trip *trips; int num_trips; - unsigned long trips_disabled; /* bitmap for disabled trips */ unsigned long passive_delay_jiffies; unsigned long polling_delay_jiffies; int temperature; |