Skip to content

Commit 96894b7

Browse files
rikardfalkebornlynxeye-dev
authored andcommitted
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 <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
1 parent f5be833 commit 96894b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/etnaviv/etnaviv_gpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1658,7 +1658,7 @@ etnaviv_gpu_cooling_set_cur_state(struct thermal_cooling_device *cdev,
16581658
return 0;
16591659
}
16601660

1661-
static struct thermal_cooling_device_ops cooling_ops = {
1661+
static const struct thermal_cooling_device_ops cooling_ops = {
16621662
.get_max_state = etnaviv_gpu_cooling_get_max_state,
16631663
.get_cur_state = etnaviv_gpu_cooling_get_cur_state,
16641664
.set_cur_state = etnaviv_gpu_cooling_set_cur_state,

0 commit comments

Comments
 (0)