]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal: core: Introduce thermal_instance_delete()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Oct 2024 22:15:22 +0000 (00:15 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 23 Oct 2024 09:57:04 +0000 (11:57 +0200)
commitc690dce5dceef1d2818c52f3df2d3511f028632f
tree6aa1c4d1784ba3eda551eef83cb58cb9bb177be3
parent6d153f52cc3452258415db6a202cc6d15daa3920
thermal: core: Introduce thermal_instance_delete()

It is not necessary to walk the thermal_instances list in a trip
descriptor under a cooling device lock, so acquire that lock only
for deleting the given thermal instance from the list of thermal
instances in the given cdev.

Moreover, in analogy with the previous change that introduced
thermal_instance_add(), put the code deleting the given thermal
instance from the lists it is on into a separate new function
called thermal_instance_delete().

No intentional functional impact.

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