diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2021-02-10 02:48:15 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-02-25 16:40:24 +0300 |
commit | fff72bb569ee97a5dafe287e6b9ff4ecdf4f6d6d (patch) | |
tree | 4c1851f2ae0668822a394fa6bcff33f0192e8bdd /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 2eebbdbaab5fcde967c76892bf568a701c62e1d7 (diff) | |
download | linux-fff72bb569ee97a5dafe287e6b9ff4ecdf4f6d6d.tar.xz |
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 <rikard.falkeborn@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210209234817.55112-2-rikard.falkeborn@gmail.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 29cfb0809634..a785acc09f20 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -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, |