Browse Source

IB/hfi1: constify vm_operations_struct

vm_operations_struct are not supposed to change at runtime.
vm_area_struct structure working with const vm_operations_struct.
So mark the non-const vm_operations_struct structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Arvind Yadav 8 years ago
parent
commit
733da3bcb3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/infiniband/hw/hfi1/file_ops.c

+ 1 - 1
drivers/infiniband/hw/hfi1/file_ops.c

@@ -120,7 +120,7 @@ static const struct file_operations hfi1_file_ops = {
 	.llseek = noop_llseek,
 };
 
-static struct vm_operations_struct vm_ops = {
+static const struct vm_operations_struct vm_ops = {
 	.fault = vma_fault,
 };