diff mbox series

[thermal:,thermal/next] thermal/drivers/intel_powerclamp: Constify static thermal_cooling_device_ops

Message ID 163930803664.23020.3518453177211102978.tip-bot2@tip-bot2
State New
Headers show
Series [thermal:,thermal/next] thermal/drivers/intel_powerclamp: Constify static thermal_cooling_device_ops | expand

Commit Message

thermal-bot for Lad Prabhakar Dec. 12, 2021, 11:20 a.m. UTC
The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     8152d2a9e73deb2b483bef9035d53ded27f50317
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//8152d2a9e73deb2b483bef9035d53ded27f50317
Author:        Rikard Falkeborn <rikard.falkeborn@gmail.com>
AuthorDate:    Sun, 28 Nov 2021 22:46:41 +01:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Tue, 30 Nov 2021 15:42:39 +01:00

thermal/drivers/intel_powerclamp: Constify static thermal_cooling_device_ops

The only usage of powerclamp_cooling_ops is to pass its address to
thermal_cooling_device_register(), which takes a pointer to const struct
thermal_cooling_device_ops. Make it const to allow the compiler to put
it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20211128214641.30953-1-rikard.falkeborn@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/thermal/intel/intel_powerclamp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c
index 9b68489..1425642 100644
--- a/drivers/thermal/intel/intel_powerclamp.c
+++ b/drivers/thermal/intel/intel_powerclamp.c
@@ -641,7 +641,7 @@  exit_set:
 }
 
 /* bind to generic thermal layer as cooling device*/
-static struct thermal_cooling_device_ops powerclamp_cooling_ops = {
+static const struct thermal_cooling_device_ops powerclamp_cooling_ops = {
 	.get_max_state = powerclamp_get_max_state,
 	.get_cur_state = powerclamp_get_cur_state,
 	.set_cur_state = powerclamp_set_cur_state,