From: Rikard Falkeborn Date: Sun, 28 Nov 2021 21:46:41 +0000 (+0100) Subject: thermal/drivers/intel_powerclamp: Constify static thermal_cooling_device_ops X-Git-Tag: v6.1-rc5~2302^2~1^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8152d2a9e73deb2b483bef9035d53ded27f50317;p=platform%2Fkernel%2Flinux-starfive.git 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 Link: https://lore.kernel.org/r/20211128214641.30953-1-rikard.falkeborn@gmail.com Signed-off-by: Daniel Lezcano --- diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c index 9b68489a2356..14256421d98c 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,