• Rafael J. Wysocki's avatar
    thermal: trip: Drop lockdep assertion from thermal_zone_trip_id() · 108ffd12
    Rafael J. Wysocki authored
    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: 2c7b4bfa ("thermal: core: Store trip pointer in struct thermal_instance")
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    108ffd12
thermal_trip.c 4.32 KB