aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/rtas_flash.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:31 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:44 -0500
commit5dfe4c964a0dd7bb3a1d64a4166835a153146207 (patch)
tree2fb2fd8c09922be4f40a5a9ac50b537b1d780e27 /arch/powerpc/kernel/rtas_flash.c
parent540473208f8ac71c25a87e1a2670c3c18dd4d6db (diff)
[PATCH] mark struct file_operations const 2
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. [akpm@osdl.org: sparc64 fix] 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 'arch/powerpc/kernel/rtas_flash.c')
-rw-r--r--arch/powerpc/kernel/rtas_flash.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 65e4ebe8db31..f72118c0844f 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -702,7 +702,7 @@ static int initialize_flash_pde_data(const char *rtas_call_name,
702} 702}
703 703
704static struct proc_dir_entry *create_flash_pde(const char *filename, 704static struct proc_dir_entry *create_flash_pde(const char *filename,
705 struct file_operations *fops) 705 const struct file_operations *fops)
706{ 706{
707 struct proc_dir_entry *ent = NULL; 707 struct proc_dir_entry *ent = NULL;
708 708
@@ -715,21 +715,21 @@ static struct proc_dir_entry *create_flash_pde(const char *filename,
715 return ent; 715 return ent;
716} 716}
717 717
718static struct file_operations rtas_flash_operations = { 718static const struct file_operations rtas_flash_operations = {
719 .read = rtas_flash_read, 719 .read = rtas_flash_read,
720 .write = rtas_flash_write, 720 .write = rtas_flash_write,
721 .open = rtas_excl_open, 721 .open = rtas_excl_open,
722 .release = rtas_flash_release, 722 .release = rtas_flash_release,
723}; 723};
724 724
725static struct file_operations manage_flash_operations = { 725static const struct file_operations manage_flash_operations = {
726 .read = manage_flash_read, 726 .read = manage_flash_read,
727 .write = manage_flash_write, 727 .write = manage_flash_write,
728 .open = rtas_excl_open, 728 .open = rtas_excl_open,
729 .release = rtas_excl_release, 729 .release = rtas_excl_release,
730}; 730};
731 731
732static struct file_operations validate_flash_operations = { 732static const struct file_operations validate_flash_operations = {
733 .read = validate_flash_read, 733 .read = validate_flash_read,
734 .write = validate_flash_write, 734 .write = validate_flash_write,
735 .open = rtas_excl_open, 735 .open = rtas_excl_open,