summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-10-11 18:45:42 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-10-11 18:45:42 +0300
commit108ffd12be24ba1d74b3314df8db32a0a6d55ba5 (patch)
treeb1b048182ab126b24e2098e3db5574c6aeaef206 /drivers/thermal
parentb44444027ce7714f309e96b804b7fb088a40d708 (diff)
downloadlinux-108ffd12be24ba1d74b3314df8db32a0a6d55ba5.tar.xz
thermal: trip: Drop lockdep assertion from thermal_zone_trip_id()
The lockdep assertion in thermal_zone_trip_id() triggers when the trip point sysfs attribute of a thermal instance is read, because there is no thermal zone locking in that code path. This is not verly useful, though, because there is no mechanism by which the location of the trips[] table in a thermal zone or its size can change after binding cooling devices to the trips in that thermal zone and before those cooling devices are unbound from them. Thus it is not in fact necessary to hold the thermal zone lock when thermal_zone_trip_id() is called from trip_point_show() and so the lockdep asserion in the former is invalid. Accordingly, drop that lockdep assertion. Fixes: 2c7b4bfadef0 ("thermal: core: Store trip pointer in struct thermal_instance") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_trip.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/thermal/thermal_trip.c b/drivers/thermal/thermal_trip.c
index 9f10e2ff9248..80f3cdb2f30e 100644
--- a/drivers/thermal/thermal_trip.c
+++ b/drivers/thermal/thermal_trip.c
@@ -175,8 +175,6 @@ int thermal_zone_trip_id(struct thermal_zone_device *tz,
{
int i;
- lockdep_assert_held(&tz->lock);
-
for (i = 0; i < tz->num_trips; i++) {
if (&tz->trips[i] == trip)
return i;