]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal: ACPI: Use the .should_bind() thermal zone callback
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 19 Aug 2024 16:02:44 +0000 (18:02 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 22 Aug 2024 15:43:14 +0000 (17:43 +0200)
commitb1c75b3820c18b53cc117bbb02e86b41b018b70a
treedda69b426f60bc07ace8191d2a7a8f7e7c981b7f
parentaa35e56a5217b86f9c05420c36c908baf3b2df5f
thermal: ACPI: Use the .should_bind() thermal zone callback

Make the ACPI thermal zone driver use the .should_bind() thermal zone
callback to provide the thermal core with the information on whether or
not to bind the given cooling device to the given trip point in the
given thermal zone.  If it returns 'true', the thermal core will bind
the cooling device to the trip and the corresponding unbinding will be
taken care of automatically by the core on the removal of the involved
thermal zone or cooling device.

This replaces the .bind() and .unbind() thermal zone callbacks which
allows the code to be simplified quite significantly while providing
the same functionality.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/1812827.VLH7GnMWUR@rjwysocki.net
drivers/acpi/thermal.c