thermal: intel: int340x: Use zone lock for synchronization
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 25 Jan 2023 14:54:03 +0000 (15:54 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 27 Jan 2023 14:11:12 +0000 (15:11 +0100)
commit9e9b7e182cf34ce5e5f50f1fa2470d051e3c8f90
treea3907e8149baab214c0274893e44c04fa9cb57be
parentb1bf9dbffc3049ca22ab36cb807b671655a936d0
thermal: intel: int340x: Use zone lock for synchronization

Because the ->get_trip_temp() and ->get_trip_type() thermal zone
callbacks are only invoked from __thermal_zone_get_trip() which is
always called by the thermal core under the zone lock, it is sufficient
for int340x_thermal_update_trips() to acquire the zone lock for mutual
exclusion with those callbacks.

Accordingly, modify int340x_thermal_update_trips() to use the zone lock
instead of the internal trip_mutex and drop the latter which is not
necessary any more.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.h