]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal: core: Call thermal_governor_update_tz() outside of cdev lock
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Oct 2024 22:12:11 +0000 (00:12 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 23 Oct 2024 09:56:49 +0000 (11:56 +0200)
commit33eab804d695dc2be1491890143a64ea4d99cd42
tree941b13663c208c21902e87f6fe20abce93cc874e
parentd1c8aa2a5c5c624f25efc78000ea9801948aea15
thermal: core: Call thermal_governor_update_tz() outside of cdev lock

Holding a cooling device lock under thermal_governor_update_tz() is not
necessary and it may cause lockdep to complain if any governor's
.update_tz() callback attempts to lock a cdev.

For this reason, move the thermal_governor_update_tz() calls in
thermal_bind_cdev_to_trip() and thermal_unbind_cdev_from_trip() from
under the cdev lock.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/7749552.EvYhyI6sBW@rjwysocki.net
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
drivers/thermal/thermal_core.c