diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:45 -0500 |
commit | 00977a59b951207d38380c75f03a36829950265c (patch) | |
tree | 26933feafebffca95df02c19df03f5e56aada47e /drivers/sbus/char/vfc_dev.c | |
parent | d54b1fdb1d9f82e375a299e22bd366aad52d4c34 (diff) |
[PATCH] mark struct file_operations const 6
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/sbus/char/vfc_dev.c')
-rw-r--r-- | drivers/sbus/char/vfc_dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 386e7de0b7e3..37a04a0cecfa 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include "vfc.h" | 44 | #include "vfc.h" |
45 | #include <asm/vfc_ioctls.h> | 45 | #include <asm/vfc_ioctls.h> |
46 | 46 | ||
47 | static struct file_operations vfc_fops; | 47 | static const struct file_operations vfc_fops; |
48 | struct vfc_dev **vfc_dev_lst; | 48 | struct vfc_dev **vfc_dev_lst; |
49 | static char vfcstr[]="vfc"; | 49 | static char vfcstr[]="vfc"; |
50 | static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { | 50 | static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { |
@@ -633,7 +633,7 @@ static int vfc_mmap(struct file *file, struct vm_area_struct *vma) | |||
633 | } | 633 | } |
634 | 634 | ||
635 | 635 | ||
636 | static struct file_operations vfc_fops = { | 636 | static const struct file_operations vfc_fops = { |
637 | .owner = THIS_MODULE, | 637 | .owner = THIS_MODULE, |
638 | .llseek = no_llseek, | 638 | .llseek = no_llseek, |
639 | .ioctl = vfc_ioctl, | 639 | .ioctl = vfc_ioctl, |