Skip to content

Commit 108ffd1

Browse files
committed
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: 2c7b4bf ("thermal: core: Store trip pointer in struct thermal_instance") Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent b444440 commit 108ffd1

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/thermal/thermal_trip.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,6 @@ int thermal_zone_trip_id(struct thermal_zone_device *tz,
175175
{
176176
int i;
177177

178-
lockdep_assert_held(&tz->lock);
179-
180178
for (i = 0; i < tz->num_trips; i++) {
181179
if (&tz->trips[i] == trip)
182180
return i;

0 commit comments

Comments
 (0)