thermal: core: Drop trips_disabled bitmask
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 Sep 2023 18:54:37 +0000 (20:54 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Sep 2023 09:46:19 +0000 (11:46 +0200)
commit950210887670cbb7d2eb9af6fb743b70f1a1ebdc
treea9b81204e30e36e8e37f69b89622eaea8a4c364d
parent6465e260f48790807eef06b583b38ca9789b6072
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>
drivers/thermal/thermal_core.c
include/linux/thermal.h