mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 05:45:20 +00:00
fa4f9c9679
In analogy with a previous change in the thermal zone initialization path, to avoid acquiring the thermal zone lock and releasing it multiple times back and forth unnecessarily, move all of the code running under thermal_list_lock in thermal_zone_device_unregister() into a new function called thermal_zone_exit() and make the latter acquire the thermal zone lock only once and release it along with thermal_list_lock. For this purpose, provide an "unlocked" variant of thermal_zone_cdev_unbind() to be called by thermal_zone_exit() under the thermal zone lock. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/1963152.taCxCBeP46@rjwysocki.net Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>