From: Rikard Falkeborn Date: Sun, 28 Nov 2021 20:19:16 +0000 (+0100) Subject: drm/etnaviv: constify static struct cooling_ops X-Git-Tag: v5.17-rc1~173^2~5^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96894b79596756d71a3e6af5ae6fc5238e058e77;p=thirdparty%2Flinux.git drm/etnaviv: constify static struct cooling_ops The only usage of cooling_ops is to pass its address to thermal_of_cooling_device_register(), which takes a pointer to const struct thermal_cooling_device_ops as input. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach --- diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index 242a5fd8b9321..ba5fd012a40a9 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1658,7 +1658,7 @@ etnaviv_gpu_cooling_set_cur_state(struct thermal_cooling_device *cdev, return 0; } -static struct thermal_cooling_device_ops cooling_ops = { +static const struct thermal_cooling_device_ops cooling_ops = { .get_max_state = etnaviv_gpu_cooling_get_max_state, .get_cur_state = etnaviv_gpu_cooling_get_cur_state, .set_cur_state = etnaviv_gpu_cooling_set_cur_state,