]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
thermal: core: constify params in thermal_zone_device_register
authorAhmad Fatoum <a.fatoum@pengutronix.de>
Sat, 8 Jul 2023 11:27:19 +0000 (13:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:47:50 +0000 (09:47 +0200)
commitba98d42dd3d37b8f9562129c738f9f138ab0b839
tree2368315ee377f4855ab0ddcbd32d9f092bb8f91b
parent95992abd2b7e02e95ffb9c9d0a0646a67700e88d
thermal: core: constify params in thermal_zone_device_register

[ Upstream commit 80ddce5f2dbd0e83eadc9f9d373439180d599fe5 ]

Since commit 3d439b1a2ad3 ("thermal/core: Alloc-copy-free the thermal zone
parameters structure"), thermal_zone_device_register() allocates a copy
of the tzp argument and callers need not explicitly manage its lifetime.

This means the function no longer cares about the parameter being
mutable, so constify it.

No functional change.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/thermal_core.c
include/linux/thermal.h