aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2009-09-27 14:29:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-27 14:39:25 -0400
commitf0f37e2f77731b3473fa6bd5ee53255d9a9cdb40 (patch)
tree3c26d3ed1a453156e9c208ccb5567a8954dba064 /drivers
parent6f5071020d5ec89b5d095aa488db604adb921aec (diff)
const: mark struct vm_struct_operations
* mark struct vm_area_struct::vm_ops as const * mark vm_ops in AGP code But leave TTM code alone, something is fishy there with global vm_ops being used. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/agp/agp.h2
-rw-r--r--drivers/char/agp/alpha-agp.c2
-rw-r--r--drivers/char/mem.c2
-rw-r--r--drivers/char/mspec.c2
-rw-r--r--drivers/gpu/drm/drm_vm.c8
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c2
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_vm.c2
-rw-r--r--drivers/ieee1394/dma.c2
-rw-r--r--drivers/infiniband/hw/ehca/ehca_uverbs.c2
-rw-r--r--drivers/infiniband/hw/ipath/ipath_file_ops.c2
-rw-r--r--drivers/infiniband/hw/ipath/ipath_mmap.c2
-rw-r--r--drivers/media/video/cafe_ccic.c2
-rw-r--r--drivers/media/video/et61x251/et61x251_core.c2
-rw-r--r--drivers/media/video/gspca/gspca.c2
-rw-r--r--drivers/media/video/meye.c2
-rw-r--r--drivers/media/video/sn9c102/sn9c102_core.c2
-rw-r--r--drivers/media/video/stk-webcam.c2
-rw-r--r--drivers/media/video/uvc/uvc_v4l2.c2
-rw-r--r--drivers/media/video/videobuf-dma-contig.c2
-rw-r--r--drivers/media/video/videobuf-dma-sg.c2
-rw-r--r--drivers/media/video/videobuf-vmalloc.c2
-rw-r--r--drivers/media/video/vino.c2
-rw-r--r--drivers/media/video/zc0301/zc0301_core.c2
-rw-r--r--drivers/media/video/zoran/zoran_driver.c2
-rw-r--r--drivers/misc/sgi-gru/grufile.c2
-rw-r--r--drivers/misc/sgi-gru/grutables.h2
-rw-r--r--drivers/scsi/sg.c2
-rw-r--r--drivers/uio/uio.c2
-rw-r--r--drivers/usb/mon/mon_bin.c2
-rw-r--r--drivers/video/fb_defio.c2
-rw-r--r--drivers/video/omap/dispc.c2
31 files changed, 34 insertions, 34 deletions
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index d6f36c004d9b..870f12cfed93 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -131,7 +131,7 @@ struct agp_bridge_driver {
131struct agp_bridge_data { 131struct agp_bridge_data {
132 const struct agp_version *version; 132 const struct agp_version *version;
133 const struct agp_bridge_driver *driver; 133 const struct agp_bridge_driver *driver;
134 struct vm_operations_struct *vm_ops; 134 const struct vm_operations_struct *vm_ops;
135 void *previous_size; 135 void *previous_size;
136 void *current_size; 136 void *current_size;
137 void *dev_private_data; 137 void *dev_private_data;
diff --git a/drivers/char/agp/alpha-agp.c b/drivers/char/agp/alpha-agp.c
index 5ea4da8e9954..dd84af4d4f7e 100644
--- a/drivers/char/agp/alpha-agp.c
+++ b/drivers/char/agp/alpha-agp.c
@@ -40,7 +40,7 @@ static struct aper_size_info_fixed alpha_core_agp_sizes[] =
40 { 0, 0, 0 }, /* filled in by alpha_core_agp_setup */ 40 { 0, 0, 0 }, /* filled in by alpha_core_agp_setup */
41}; 41};
42 42
43struct vm_operations_struct alpha_core_agp_vm_ops = { 43static const struct vm_operations_struct alpha_core_agp_vm_ops = {
44 .fault = alpha_core_agp_vm_fault, 44 .fault = alpha_core_agp_vm_fault,
45}; 45};
46 46
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 6c8b65d069e5..a074fceb67d3 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -301,7 +301,7 @@ static inline int private_mapping_ok(struct vm_area_struct *vma)
301} 301}
302#endif 302#endif
303 303
304static struct vm_operations_struct mmap_mem_ops = { 304static const struct vm_operations_struct mmap_mem_ops = {
305#ifdef CONFIG_HAVE_IOREMAP_PROT 305#ifdef CONFIG_HAVE_IOREMAP_PROT
306 .access = generic_access_phys 306 .access = generic_access_phys
307#endif 307#endif
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c
index 30f095a8c2d4..1997270bb6f4 100644
--- a/drivers/char/mspec.c
+++ b/drivers/char/mspec.c
@@ -239,7 +239,7 @@ mspec_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
239 return VM_FAULT_NOPAGE; 239 return VM_FAULT_NOPAGE;
240} 240}
241 241
242static struct vm_operations_struct mspec_vm_ops = { 242static const struct vm_operations_struct mspec_vm_ops = {
243 .open = mspec_open, 243 .open = mspec_open,
244 .close = mspec_close, 244 .close = mspec_close,
245 .fault = mspec_fault, 245 .fault = mspec_fault,
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 7e1fbe5d4779..4ac900f4647f 100644
--- a/drivers/gpu/drm/drm_vm.c
+++ b/drivers/gpu/drm/drm_vm.c
@@ -369,28 +369,28 @@ static int drm_vm_sg_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
369} 369}
370 370
371/** AGP virtual memory operations */ 371/** AGP virtual memory operations */
372static struct vm_operations_struct drm_vm_ops = { 372static const struct vm_operations_struct drm_vm_ops = {
373 .fault = drm_vm_fault, 373 .fault = drm_vm_fault,
374 .open = drm_vm_open, 374 .open = drm_vm_open,
375 .close = drm_vm_close, 375 .close = drm_vm_close,
376}; 376};
377 377
378/** Shared virtual memory operations */ 378/** Shared virtual memory operations */
379static struct vm_operations_struct drm_vm_shm_ops = { 379static const struct vm_operations_struct drm_vm_shm_ops = {
380 .fault = drm_vm_shm_fault, 380 .fault = drm_vm_shm_fault,
381 .open = drm_vm_open, 381 .open = drm_vm_open,
382 .close = drm_vm_shm_close, 382 .close = drm_vm_shm_close,
383}; 383};
384 384
385/** DMA virtual memory operations */ 385/** DMA virtual memory operations */
386static struct vm_operations_struct drm_vm_dma_ops = { 386static const struct vm_operations_struct drm_vm_dma_ops = {
387 .fault = drm_vm_dma_fault, 387 .fault = drm_vm_dma_fault,
388 .open = drm_vm_open, 388 .open = drm_vm_open,
389 .close = drm_vm_close, 389 .close = drm_vm_close,
390}; 390};
391 391
392/** Scatter-gather virtual memory operations */ 392/** Scatter-gather virtual memory operations */
393static struct vm_operations_struct drm_vm_sg_ops = { 393static const struct vm_operations_struct drm_vm_sg_ops = {
394 .fault = drm_vm_sg_fault, 394 .fault = drm_vm_sg_fault,
395 .open = drm_vm_open, 395 .open = drm_vm_open,
396 .close = drm_vm_close, 396 .close = drm_vm_close,
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index acd889c94549..5b1cf04a011a 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -530,7 +530,7 @@ void radeon_ttm_fini(struct radeon_device *rdev)
530} 530}
531 531
532static struct vm_operations_struct radeon_ttm_vm_ops; 532static struct vm_operations_struct radeon_ttm_vm_ops;
533static struct vm_operations_struct *ttm_vm_ops = NULL; 533static const struct vm_operations_struct *ttm_vm_ops = NULL;
534 534
535static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) 535static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
536{ 536{
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index 33de7637c0c6..1c040d040338 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
@@ -228,7 +228,7 @@ static void ttm_bo_vm_close(struct vm_area_struct *vma)
228 vma->vm_private_data = NULL; 228 vma->vm_private_data = NULL;
229} 229}
230 230
231static struct vm_operations_struct ttm_bo_vm_ops = { 231static const struct vm_operations_struct ttm_bo_vm_ops = {
232 .fault = ttm_bo_vm_fault, 232 .fault = ttm_bo_vm_fault,
233 .open = ttm_bo_vm_open, 233 .open = ttm_bo_vm_open,
234 .close = ttm_bo_vm_close 234 .close = ttm_bo_vm_close
diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c
index 1aba8c13fe8f..8e7e3344c4b3 100644
--- a/drivers/ieee1394/dma.c
+++ b/drivers/ieee1394/dma.c
@@ -247,7 +247,7 @@ static int dma_region_pagefault(struct vm_area_struct *vma,
247 return 0; 247 return 0;
248} 248}
249 249
250static struct vm_operations_struct dma_region_vm_ops = { 250static const struct vm_operations_struct dma_region_vm_ops = {
251 .fault = dma_region_pagefault, 251 .fault = dma_region_pagefault,
252}; 252};
253 253
diff --git a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/ehca/ehca_uverbs.c
index 3cb688d29131..f1565cae8ec6 100644
--- a/drivers/infiniband/hw/ehca/ehca_uverbs.c
+++ b/drivers/infiniband/hw/ehca/ehca_uverbs.c
@@ -95,7 +95,7 @@ static void ehca_mm_close(struct vm_area_struct *vma)
95 vma->vm_start, vma->vm_end, *count); 95 vma->vm_start, vma->vm_end, *count);
96} 96}
97 97
98static struct vm_operations_struct vm_ops = { 98static const struct vm_operations_struct vm_ops = {
99 .open = ehca_mm_open, 99 .open = ehca_mm_open,
100 .close = ehca_mm_close, 100 .close = ehca_mm_close,
101}; 101};
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index 38a287006612..40dbe54056c7 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -1151,7 +1151,7 @@ static int ipath_file_vma_fault(struct vm_area_struct *vma,
1151 return 0; 1151 return 0;
1152} 1152}
1153 1153
1154static struct vm_operations_struct ipath_file_vm_ops = { 1154static const struct vm_operations_struct ipath_file_vm_ops = {
1155 .fault = ipath_file_vma_fault, 1155 .fault = ipath_file_vma_fault,
1156}; 1156};
1157 1157
diff --git a/drivers/infiniband/hw/ipath/ipath_mmap.c b/drivers/infiniband/hw/ipath/ipath_mmap.c
index fa830e22002f..b28865faf435 100644
--- a/drivers/infiniband/hw/ipath/ipath_mmap.c
+++ b/drivers/infiniband/hw/ipath/ipath_mmap.c
@@ -74,7 +74,7 @@ static void ipath_vma_close(struct vm_area_struct *vma)
74 kref_put(&ip->ref, ipath_release_mmap_info); 74 kref_put(&ip->ref, ipath_release_mmap_info);
75} 75}
76 76
77static struct vm_operations_struct ipath_vm_ops = { 77static const struct vm_operations_struct ipath_vm_ops = {
78 .open = ipath_vma_open, 78 .open = ipath_vma_open,
79 .close = ipath_vma_close, 79 .close = ipath_vma_close,
80}; 80};
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index 657c481d255c..10230cb3d210 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -1325,7 +1325,7 @@ static void cafe_v4l_vm_close(struct vm_area_struct *vma)
1325 mutex_unlock(&sbuf->cam->s_mutex); 1325 mutex_unlock(&sbuf->cam->s_mutex);
1326} 1326}
1327 1327
1328static struct vm_operations_struct cafe_v4l_vm_ops = { 1328static const struct vm_operations_struct cafe_v4l_vm_ops = {
1329 .open = cafe_v4l_vm_open, 1329 .open = cafe_v4l_vm_open,
1330 .close = cafe_v4l_vm_close 1330 .close = cafe_v4l_vm_close
1331}; 1331};
diff --git a/drivers/media/video/et61x251/et61x251_core.c b/drivers/media/video/et61x251/et61x251_core.c
index 74092f436be6..88987a57cf7b 100644
--- a/drivers/media/video/et61x251/et61x251_core.c
+++ b/drivers/media/video/et61x251/et61x251_core.c
@@ -1496,7 +1496,7 @@ static void et61x251_vm_close(struct vm_area_struct* vma)
1496} 1496}
1497 1497
1498 1498
1499static struct vm_operations_struct et61x251_vm_ops = { 1499static const struct vm_operations_struct et61x251_vm_ops = {
1500 .open = et61x251_vm_open, 1500 .open = et61x251_vm_open,
1501 .close = et61x251_vm_close, 1501 .close = et61x251_vm_close,
1502}; 1502};
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index cf6540da1e42..23d3fb776918 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -99,7 +99,7 @@ static void gspca_vm_close(struct vm_area_struct *vma)
99 frame->v4l2_buf.flags &= ~V4L2_BUF_FLAG_MAPPED; 99 frame->v4l2_buf.flags &= ~V4L2_BUF_FLAG_MAPPED;
100} 100}
101 101
102static struct vm_operations_struct gspca_vm_ops = { 102static const struct vm_operations_struct gspca_vm_ops = {
103 .open = gspca_vm_open, 103 .open = gspca_vm_open,
104 .close = gspca_vm_close, 104 .close = gspca_vm_close,
105}; 105};
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index d0765bed79c9..4b1bc05a462c 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -1589,7 +1589,7 @@ static void meye_vm_close(struct vm_area_struct *vma)
1589 meye.vma_use_count[idx]--; 1589 meye.vma_use_count[idx]--;
1590} 1590}
1591 1591
1592static struct vm_operations_struct meye_vm_ops = { 1592static const struct vm_operations_struct meye_vm_ops = {
1593 .open = meye_vm_open, 1593 .open = meye_vm_open,
1594 .close = meye_vm_close, 1594 .close = meye_vm_close,
1595}; 1595};
diff --git a/drivers/media/video/sn9c102/sn9c102_core.c b/drivers/media/video/sn9c102/sn9c102_core.c
index 9d84c94e8a40..4a7711c3e745 100644
--- a/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/drivers/media/video/sn9c102/sn9c102_core.c
@@ -2077,7 +2077,7 @@ static void sn9c102_vm_close(struct vm_area_struct* vma)
2077} 2077}
2078 2078
2079 2079
2080static struct vm_operations_struct sn9c102_vm_ops = { 2080static const struct vm_operations_struct sn9c102_vm_ops = {
2081 .open = sn9c102_vm_open, 2081 .open = sn9c102_vm_open,
2082 .close = sn9c102_vm_close, 2082 .close = sn9c102_vm_close,
2083}; 2083};
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index 0b996ea4134e..6b41865f42bd 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -790,7 +790,7 @@ static void stk_v4l_vm_close(struct vm_area_struct *vma)
790 if (sbuf->mapcount == 0) 790 if (sbuf->mapcount == 0)
791 sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_MAPPED; 791 sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_MAPPED;
792} 792}
793static struct vm_operations_struct stk_v4l_vm_ops = { 793static const struct vm_operations_struct stk_v4l_vm_ops = {
794 .open = stk_v4l_vm_open, 794 .open = stk_v4l_vm_open,
795 .close = stk_v4l_vm_close 795 .close = stk_v4l_vm_close
796}; 796};
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
index 9e7351569b5d..a2bdd806efab 100644
--- a/drivers/media/video/uvc/uvc_v4l2.c
+++ b/drivers/media/video/uvc/uvc_v4l2.c
@@ -1069,7 +1069,7 @@ static void uvc_vm_close(struct vm_area_struct *vma)
1069 buffer->vma_use_count--; 1069 buffer->vma_use_count--;
1070} 1070}
1071 1071
1072static struct vm_operations_struct uvc_vm_ops = { 1072static const struct vm_operations_struct uvc_vm_ops = {
1073 .open = uvc_vm_open, 1073 .open = uvc_vm_open,
1074 .close = uvc_vm_close, 1074 .close = uvc_vm_close,
1075}; 1075};
diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c
index d09ce83a9429..635ffc7b0391 100644
--- a/drivers/media/video/videobuf-dma-contig.c
+++ b/drivers/media/video/videobuf-dma-contig.c
@@ -105,7 +105,7 @@ static void videobuf_vm_close(struct vm_area_struct *vma)
105 } 105 }
106} 106}
107 107
108static struct vm_operations_struct videobuf_vm_ops = { 108static const struct vm_operations_struct videobuf_vm_ops = {
109 .open = videobuf_vm_open, 109 .open = videobuf_vm_open,
110 .close = videobuf_vm_close, 110 .close = videobuf_vm_close,
111}; 111};
diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
index a8dd22ace3fb..53cdd67cebe1 100644
--- a/drivers/media/video/videobuf-dma-sg.c
+++ b/drivers/media/video/videobuf-dma-sg.c
@@ -394,7 +394,7 @@ videobuf_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
394 return 0; 394 return 0;
395} 395}
396 396
397static struct vm_operations_struct videobuf_vm_ops = 397static const struct vm_operations_struct videobuf_vm_ops =
398{ 398{
399 .open = videobuf_vm_open, 399 .open = videobuf_vm_open,
400 .close = videobuf_vm_close, 400 .close = videobuf_vm_close,
diff --git a/drivers/media/video/videobuf-vmalloc.c b/drivers/media/video/videobuf-vmalloc.c
index 30ae30f99ccc..35f3900c5633 100644
--- a/drivers/media/video/videobuf-vmalloc.c
+++ b/drivers/media/video/videobuf-vmalloc.c
@@ -116,7 +116,7 @@ static void videobuf_vm_close(struct vm_area_struct *vma)
116 return; 116 return;
117} 117}
118 118
119static struct vm_operations_struct videobuf_vm_ops = 119static const struct vm_operations_struct videobuf_vm_ops =
120{ 120{
121 .open = videobuf_vm_open, 121 .open = videobuf_vm_open,
122 .close = videobuf_vm_close, 122 .close = videobuf_vm_close,
diff --git a/drivers/media/video/vino.c b/drivers/media/video/vino.c
index cd6a3446ab7e..b034a81d2b1c 100644
--- a/drivers/media/video/vino.c
+++ b/drivers/media/video/vino.c
@@ -3857,7 +3857,7 @@ static void vino_vm_close(struct vm_area_struct *vma)
3857 dprintk("vino_vm_close(): count = %d\n", fb->map_count); 3857 dprintk("vino_vm_close(): count = %d\n", fb->map_count);
3858} 3858}
3859 3859
3860static struct vm_operations_struct vino_vm_ops = { 3860static const struct vm_operations_struct vino_vm_ops = {
3861 .open = vino_vm_open, 3861 .open = vino_vm_open,
3862 .close = vino_vm_close, 3862 .close = vino_vm_close,
3863}; 3863};
diff --git a/drivers/media/video/zc0301/zc0301_core.c b/drivers/media/video/zc0301/zc0301_core.c
index b3c6436b33ba..312a71336fd0 100644
--- a/drivers/media/video/zc0301/zc0301_core.c
+++ b/drivers/media/video/zc0301/zc0301_core.c
@@ -935,7 +935,7 @@ static void zc0301_vm_close(struct vm_area_struct* vma)
935} 935}
936 936
937 937
938static struct vm_operations_struct zc0301_vm_ops = { 938static const struct vm_operations_struct zc0301_vm_ops = {
939 .open = zc0301_vm_open, 939 .open = zc0301_vm_open,
940 .close = zc0301_vm_close, 940 .close = zc0301_vm_close,
941}; 941};
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c
index bcdefb1bcb3d..47137deafcfd 100644
--- a/drivers/media/video/zoran/zoran_driver.c
+++ b/drivers/media/video/zoran/zoran_driver.c
@@ -3172,7 +3172,7 @@ zoran_vm_close (struct vm_area_struct *vma)
3172 mutex_unlock(&zr->resource_lock); 3172 mutex_unlock(&zr->resource_lock);
3173} 3173}
3174 3174
3175static struct vm_operations_struct zoran_vm_ops = { 3175static const struct vm_operations_struct zoran_vm_ops = {
3176 .open = zoran_vm_open, 3176 .open = zoran_vm_open,
3177 .close = zoran_vm_close, 3177 .close = zoran_vm_close,
3178}; 3178};
diff --git a/drivers/misc/sgi-gru/grufile.c b/drivers/misc/sgi-gru/grufile.c
index aed609832bc2..300e7ba391a0 100644
--- a/drivers/misc/sgi-gru/grufile.c
+++ b/drivers/misc/sgi-gru/grufile.c
@@ -438,7 +438,7 @@ static struct miscdevice gru_miscdev = {
438 .fops = &gru_fops, 438 .fops = &gru_fops,
439}; 439};
440 440
441struct vm_operations_struct gru_vm_ops = { 441const struct vm_operations_struct gru_vm_ops = {
442 .close = gru_vma_close, 442 .close = gru_vma_close,
443 .fault = gru_fault, 443 .fault = gru_fault,
444}; 444};
diff --git a/drivers/misc/sgi-gru/grutables.h b/drivers/misc/sgi-gru/grutables.h
index 34ab3d453919..46990bcfa536 100644
--- a/drivers/misc/sgi-gru/grutables.h
+++ b/drivers/misc/sgi-gru/grutables.h
@@ -624,7 +624,7 @@ static inline int is_kernel_context(struct gru_thread_state *gts)
624 */ 624 */
625struct gru_unload_context_req; 625struct gru_unload_context_req;
626 626
627extern struct vm_operations_struct gru_vm_ops; 627extern const struct vm_operations_struct gru_vm_ops;
628extern struct device *grudev; 628extern struct device *grudev;
629 629
630extern struct gru_vma_data *gru_alloc_vma_data(struct vm_area_struct *vma, 630extern struct gru_vma_data *gru_alloc_vma_data(struct vm_area_struct *vma,
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 848b59466850..0cb049f5cc56 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1185,7 +1185,7 @@ sg_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1185 return VM_FAULT_SIGBUS; 1185 return VM_FAULT_SIGBUS;
1186} 1186}
1187 1187
1188static struct vm_operations_struct sg_mmap_vm_ops = { 1188static const struct vm_operations_struct sg_mmap_vm_ops = {
1189 .fault = sg_vma_fault, 1189 .fault = sg_vma_fault,
1190}; 1190};
1191 1191
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 03efb065455f..a9d707047202 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -658,7 +658,7 @@ static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
658 return 0; 658 return 0;
659} 659}
660 660
661static struct vm_operations_struct uio_vm_ops = { 661static const struct vm_operations_struct uio_vm_ops = {
662 .open = uio_vma_open, 662 .open = uio_vma_open,
663 .close = uio_vma_close, 663 .close = uio_vma_close,
664 .fault = uio_vma_fault, 664 .fault = uio_vma_fault,
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index dfdc43e2e00d..9ed3e741bee1 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -1174,7 +1174,7 @@ static int mon_bin_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1174 return 0; 1174 return 0;
1175} 1175}
1176 1176
1177static struct vm_operations_struct mon_bin_vm_ops = { 1177static const struct vm_operations_struct mon_bin_vm_ops = {
1178 .open = mon_bin_vma_open, 1178 .open = mon_bin_vma_open,
1179 .close = mon_bin_vma_close, 1179 .close = mon_bin_vma_close,
1180 .fault = mon_bin_vma_fault, 1180 .fault = mon_bin_vma_fault,
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
index 0a7a6679ee6e..c27ab1ed9604 100644
--- a/drivers/video/fb_defio.c
+++ b/drivers/video/fb_defio.c
@@ -125,7 +125,7 @@ page_already_added:
125 return 0; 125 return 0;
126} 126}
127 127
128static struct vm_operations_struct fb_deferred_io_vm_ops = { 128static const struct vm_operations_struct fb_deferred_io_vm_ops = {
129 .fault = fb_deferred_io_fault, 129 .fault = fb_deferred_io_fault,
130 .page_mkwrite = fb_deferred_io_mkwrite, 130 .page_mkwrite = fb_deferred_io_mkwrite,
131}; 131};
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c
index 80a11d078df4..f16e42154229 100644
--- a/drivers/video/omap/dispc.c
+++ b/drivers/video/omap/dispc.c
@@ -1035,7 +1035,7 @@ static void mmap_user_close(struct vm_area_struct *vma)
1035 atomic_dec(&dispc.map_count[plane]); 1035 atomic_dec(&dispc.map_count[plane]);
1036} 1036}
1037 1037
1038static struct vm_operations_struct mmap_user_ops = { 1038static const struct vm_operations_struct mmap_user_ops = {
1039 .open = mmap_user_open, 1039 .open = mmap_user_open,
1040 .close = mmap_user_close, 1040 .close = mmap_user_close,
1041}; 1041};