diff options
author | Arjan van de Ven | 2007-02-12 00:55:36 -0800 |
---|---|---|
committer | Linus Torvalds | 2007-02-12 09:48:46 -0800 |
commit | da7071d7e32d15149cc513f096a3638097b66387 (patch) | |
tree | f56fb200090ad55b2e2a72c379b1eeea29795670 /net/irda | |
parent | 9a32144e9d7b4e21341174b1a83b82a82353be86 (diff) |
[PATCH] mark struct file_operations const 8
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 'net/irda')
-rw-r--r-- | net/irda/ircomm/ircomm_core.c | 2 | ||||
-rw-r--r-- | net/irda/iriap.c | 2 | ||||
-rw-r--r-- | net/irda/irlan/irlan_common.c | 2 | ||||
-rw-r--r-- | net/irda/irlap.c | 2 | ||||
-rw-r--r-- | net/irda/irlmp.c | 2 | ||||
-rw-r--r-- | net/irda/irttp.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c index c28ee7bce26a..ec40715dcdda 100644 --- a/net/irda/ircomm/ircomm_core.c +++ b/net/irda/ircomm/ircomm_core.c @@ -56,7 +56,7 @@ static void ircomm_control_indication(struct ircomm_cb *self, extern struct proc_dir_entry *proc_irda; static int ircomm_seq_open(struct inode *, struct file *); -static struct file_operations ircomm_proc_fops = { +static const struct file_operations ircomm_proc_fops = { .owner = THIS_MODULE, .open = ircomm_seq_open, .read = seq_read, diff --git a/net/irda/iriap.c b/net/irda/iriap.c index 98b0fa965790..915d9384f36a 100644 --- a/net/irda/iriap.c +++ b/net/irda/iriap.c @@ -1080,7 +1080,7 @@ static int irias_seq_open(struct inode *inode, struct file *file) return seq_open(file, &irias_seq_ops); } -struct file_operations irias_seq_fops = { +const struct file_operations irias_seq_fops = { .owner = THIS_MODULE, .open = irias_seq_open, .read = seq_read, diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index 9c3dc57ff746..fcf9d6599628 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c @@ -93,7 +93,7 @@ extern struct proc_dir_entry *proc_irda; static int irlan_seq_open(struct inode *inode, struct file *file); -static struct file_operations irlan_fops = { +static const struct file_operations irlan_fops = { .owner = THIS_MODULE, .open = irlan_seq_open, .read = seq_read, diff --git a/net/irda/irlap.c b/net/irda/irlap.c index fd73e4af715a..d93ebd11431e 100644 --- a/net/irda/irlap.c +++ b/net/irda/irlap.c @@ -1244,7 +1244,7 @@ out_kfree: goto out; } -struct file_operations irlap_seq_fops = { +const struct file_operations irlap_seq_fops = { .owner = THIS_MODULE, .open = irlap_seq_open, .read = seq_read, diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c index b134c3cf2bdb..9df0461b6d18 100644 --- a/net/irda/irlmp.c +++ b/net/irda/irlmp.c @@ -2026,7 +2026,7 @@ out_kfree: goto out; } -struct file_operations irlmp_seq_fops = { +const struct file_operations irlmp_seq_fops = { .owner = THIS_MODULE, .open = irlmp_seq_open, .read = seq_read, diff --git a/net/irda/irttp.c b/net/irda/irttp.c index 68836358fdf2..a7486b3bddcb 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c @@ -1895,7 +1895,7 @@ out_kfree: goto out; } -struct file_operations irttp_seq_fops = { +const struct file_operations irttp_seq_fops = { .owner = THIS_MODULE, .open = irttp_seq_open, .read = seq_read, |