aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/ibmasm/ibmasmfs.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:34 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commitd54b1fdb1d9f82e375a299e22bd366aad52d4c34 (patch)
treef94768d59702dbbc0beb9a70d9be65dbc5e5108d /drivers/misc/ibmasm/ibmasmfs.c
parentfa027c2a0a0d6d1df6b29ee99048502c93da0dd4 (diff)
[PATCH] mark struct file_operations const 5
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/misc/ibmasm/ibmasmfs.c')
-rw-r--r--drivers/misc/ibmasm/ibmasmfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c
index b99dc507de2e..c436d3de8b8b 100644
--- a/drivers/misc/ibmasm/ibmasmfs.c
+++ b/drivers/misc/ibmasm/ibmasmfs.c
@@ -156,7 +156,7 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)
156static struct dentry *ibmasmfs_create_file (struct super_block *sb, 156static struct dentry *ibmasmfs_create_file (struct super_block *sb,
157 struct dentry *parent, 157 struct dentry *parent,
158 const char *name, 158 const char *name,
159 struct file_operations *fops, 159 const struct file_operations *fops,
160 void *data, 160 void *data,
161 int mode) 161 int mode)
162{ 162{
@@ -581,28 +581,28 @@ static ssize_t remote_settings_file_write(struct file *file, const char __user *
581 return count; 581 return count;
582} 582}
583 583
584static struct file_operations command_fops = { 584static const struct file_operations command_fops = {
585 .open = command_file_open, 585 .open = command_file_open,
586 .release = command_file_close, 586 .release = command_file_close,
587 .read = command_file_read, 587 .read = command_file_read,
588 .write = command_file_write, 588 .write = command_file_write,
589}; 589};
590 590
591static struct file_operations event_fops = { 591static const struct file_operations event_fops = {
592 .open = event_file_open, 592 .open = event_file_open,
593 .release = event_file_close, 593 .release = event_file_close,
594 .read = event_file_read, 594 .read = event_file_read,
595 .write = event_file_write, 595 .write = event_file_write,
596}; 596};
597 597
598static struct file_operations r_heartbeat_fops = { 598static const struct file_operations r_heartbeat_fops = {
599 .open = r_heartbeat_file_open, 599 .open = r_heartbeat_file_open,
600 .release = r_heartbeat_file_close, 600 .release = r_heartbeat_file_close,
601 .read = r_heartbeat_file_read, 601 .read = r_heartbeat_file_read,
602 .write = r_heartbeat_file_write, 602 .write = r_heartbeat_file_write,
603}; 603};
604 604
605static struct file_operations remote_settings_fops = { 605static const struct file_operations remote_settings_fops = {
606 .open = remote_settings_file_open, 606 .open = remote_settings_file_open,
607 .release = remote_settings_file_close, 607 .release = remote_settings_file_close,
608 .read = remote_settings_file_read, 608 .read = remote_settings_file_read,