diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-09-27 14:29:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-27 14:39:25 -0400 |
commit | f0f37e2f77731b3473fa6bd5ee53255d9a9cdb40 (patch) | |
tree | 3c26d3ed1a453156e9c208ccb5567a8954dba064 /drivers/gpu | |
parent | 6f5071020d5ec89b5d095aa488db604adb921aec (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/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_vm.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ttm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_vm.c | 2 |
3 files changed, 6 insertions, 6 deletions
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 */ |
372 | static struct vm_operations_struct drm_vm_ops = { | 372 | static 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 */ |
379 | static struct vm_operations_struct drm_vm_shm_ops = { | 379 | static 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 */ |
386 | static struct vm_operations_struct drm_vm_dma_ops = { | 386 | static 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 */ |
393 | static struct vm_operations_struct drm_vm_sg_ops = { | 393 | static 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 | ||
532 | static struct vm_operations_struct radeon_ttm_vm_ops; | 532 | static struct vm_operations_struct radeon_ttm_vm_ops; |
533 | static struct vm_operations_struct *ttm_vm_ops = NULL; | 533 | static const struct vm_operations_struct *ttm_vm_ops = NULL; |
534 | 534 | ||
535 | static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | 535 | static 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 | ||
231 | static struct vm_operations_struct ttm_bo_vm_ops = { | 231 | static 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 |