Commit 19bafac4 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Christian König
Browse files

drm/nouveau/ttm: constify static vm_operations_struct



The only usage of nouveau_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: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210209234817.55112-4-rikard.falkeborn@gmail.com


Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
parent b6d4abc9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ static vm_fault_t nouveau_ttm_fault(struct vm_fault *vmf)
	return ret;
}

static struct vm_operations_struct nouveau_ttm_vm_ops = {
static const struct vm_operations_struct nouveau_ttm_vm_ops = {
	.fault = nouveau_ttm_fault,
	.open = ttm_bo_vm_open,
	.close = ttm_bo_vm_close,