drm/amdgpu/ttm: constify static vm_operations_struct

The only usage of amdgpu_ttm_vm_ops is to assign its address to the
vm_ops field in the vm_area_struct struct. Make it const to allow the
compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <[email protected]>
Reviewed-by: Christian König <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Christian König <[email protected]>
This commit is contained in:
Rikard Falkeborn authored and Christian König committed 2021-02-25 14:40:24 +01:00
1 parent 2eebbdbaab
commit fff72bb569
1 file changed
+1 -1
+1 -1
View File
@@ -2002,7 +2002,7 @@ unlock:
return ret;
}
static struct vm_operations_struct amdgpu_ttm_vm_ops = {
static const struct vm_operations_struct amdgpu_ttm_vm_ops = {
.fault = amdgpu_ttm_fault,
.open = ttm_bo_vm_open,
.close = ttm_bo_vm_close,