Skip to content

Commit 8152d2a

Browse files
rikardfalkeborndlezcano
authored andcommitted
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>
1 parent 4cf2ddf commit 8152d2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/intel/intel_powerclamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ static int powerclamp_set_cur_state(struct thermal_cooling_device *cdev,
641641
}
642642

643643
/* bind to generic thermal layer as cooling device*/
644-
static struct thermal_cooling_device_ops powerclamp_cooling_ops = {
644+
static const struct thermal_cooling_device_ops powerclamp_cooling_ops = {
645645
.get_max_state = powerclamp_get_max_state,
646646
.get_cur_state = powerclamp_get_cur_state,
647647
.set_cur_state = powerclamp_set_cur_state,

0 commit comments

Comments
 (0)