diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-02-05 22:20:32 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-02-23 18:24:48 +0100 |
commit | 62dd17846d33e75e623965e281e246dff0e01309 (patch) | |
tree | 18186918cd8431f34e50964a91de25911d2b1251 /drivers/thermal/intel/intel_pch_thermal.c | |
parent | 75fb8714728460c4584c72e2f6410944a0b2cc44 (diff) | |
download | linux-stable-62dd17846d33e75e623965e281e246dff0e01309.tar.gz linux-stable-62dd17846d33e75e623965e281e246dff0e01309.tar.bz2 linux-stable-62dd17846d33e75e623965e281e246dff0e01309.zip |
thermal: intel: Adjust ops handling during thermal zone registration
Because thermal zone operations are now stored directly in struct
thermal_zone_device, thermal zone creators can discard the operations
structure after the zone registration is complete, or it can be made
read-only.
Accordingly, make int340x_thermal_zone_add() use a local variable to
represent thermal zone operations, so it is freed automatically upon the
function exit, and make the other Intel thermal drivers use const zone
operations structures.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/thermal/intel/intel_pch_thermal.c')
-rw-r--r-- | drivers/thermal/intel/intel_pch_thermal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c index 76a552870fe0..8bfb221e57e7 100644 --- a/drivers/thermal/intel/intel_pch_thermal.c +++ b/drivers/thermal/intel/intel_pch_thermal.c @@ -132,7 +132,7 @@ static void pch_critical(struct thermal_zone_device *tzd) thermal_zone_device_type(tzd)); } -static struct thermal_zone_device_ops tzd_ops = { +static const struct thermal_zone_device_ops tzd_ops = { .get_temp = pch_thermal_get_temp, .critical = pch_critical, }; |