thermal: intel: Discard trip tables after zone registration
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 5 Feb 2024 21:16:59 +0000 (22:16 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Feb 2024 17:24:47 +0000 (18:24 +0100)
commitfcbf8780008609380d2e5b407c5bb7950fff018c
tree05985385fd1d2a04afae0dd0d60bb105c4a710b8
parent9686f04a7ba6366dbdbb5609dc26a6282803b888
thermal: intel: Discard trip tables after zone registration

Because the thermal core creates and uses its own copy of the trips
table passed to thermal_zone_device_register_with_trips(), it is not
necessary to hold on to a local copy of it any more after the given
thermal zone has been registered.

Accordingly, modify Intel thermal drivers to discard the trips tables
passed to thermal_zone_device_register_with_trips() after thermal zone
registration, for example by storing them in local variables which are
automatically discarded when the zone registration is complete.

Also make some additional code simplifications unlocked by the above
changes.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.h
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
drivers/thermal/intel/intel_pch_thermal.c
drivers/thermal/intel/intel_quark_dts_thermal.c
drivers/thermal/intel/intel_soc_dts_iosf.c
drivers/thermal/intel/intel_soc_dts_iosf.h
drivers/thermal/intel/x86_pkg_temp_thermal.c