aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:36 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:46 -0500
commitda7071d7e32d15149cc513f096a3638097b66387 (patch)
treef56fb200090ad55b2e2a72c379b1eeea29795670 /net/irda
parent9a32144e9d7b4e21341174b1a83b82a82353be86 (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.c2
-rw-r--r--net/irda/iriap.c2
-rw-r--r--net/irda/irlan/irlan_common.c2
-rw-r--r--net/irda/irlap.c2
-rw-r--r--net/irda/irlmp.c2
-rw-r--r--net/irda/irttp.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
index c28ee7bce2..ec40715dcd 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,
56extern struct proc_dir_entry *proc_irda; 56extern struct proc_dir_entry *proc_irda;
57static int ircomm_seq_open(struct inode *, struct file *); 57static int ircomm_seq_open(struct inode *, struct file *);
58 58
59static struct file_operations ircomm_proc_fops = { 59static const struct file_operations ircomm_proc_fops = {
60 .owner = THIS_MODULE, 60 .owner = THIS_MODULE,
61 .open = ircomm_seq_open, 61 .open = ircomm_seq_open,
62 .read = seq_read, 62 .read = seq_read,
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index 98b0fa9657..915d9384f3 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)
1080 return seq_open(file, &irias_seq_ops); 1080 return seq_open(file, &irias_seq_ops);
1081} 1081}
1082 1082
1083struct file_operations irias_seq_fops = { 1083const struct file_operations irias_seq_fops = {
1084 .owner = THIS_MODULE, 1084 .owner = THIS_MODULE,
1085 .open = irias_seq_open, 1085 .open = irias_seq_open,
1086 .read = seq_read, 1086 .read = seq_read,
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index 9c3dc57ff7..fcf9d65996 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;
93 93
94static int irlan_seq_open(struct inode *inode, struct file *file); 94static int irlan_seq_open(struct inode *inode, struct file *file);
95 95
96static struct file_operations irlan_fops = { 96static const struct file_operations irlan_fops = {
97 .owner = THIS_MODULE, 97 .owner = THIS_MODULE,
98 .open = irlan_seq_open, 98 .open = irlan_seq_open,
99 .read = seq_read, 99 .read = seq_read,
diff --git a/net/irda/irlap.c b/net/irda/irlap.c
index fd73e4af71..d93ebd1143 100644
--- a/net/irda/irlap.c
+++ b/net/irda/irlap.c
@@ -1244,7 +1244,7 @@ out_kfree:
1244 goto out; 1244 goto out;
1245} 1245}
1246 1246
1247struct file_operations irlap_seq_fops = { 1247const struct file_operations irlap_seq_fops = {
1248 .owner = THIS_MODULE, 1248 .owner = THIS_MODULE,
1249 .open = irlap_seq_open, 1249 .open = irlap_seq_open,
1250 .read = seq_read, 1250 .read = seq_read,
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
index b134c3cf2b..9df0461b6d 100644
--- a/net/irda/irlmp.c
+++ b/net/irda/irlmp.c
@@ -2026,7 +2026,7 @@ out_kfree:
2026 goto out; 2026 goto out;
2027} 2027}
2028 2028
2029struct file_operations irlmp_seq_fops = { 2029const struct file_operations irlmp_seq_fops = {
2030 .owner = THIS_MODULE, 2030 .owner = THIS_MODULE,
2031 .open = irlmp_seq_open, 2031 .open = irlmp_seq_open,
2032 .read = seq_read, 2032 .read = seq_read,
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 68836358fd..a7486b3bdd 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -1895,7 +1895,7 @@ out_kfree:
1895 goto out; 1895 goto out;
1896} 1896}
1897 1897
1898struct file_operations irttp_seq_fops = { 1898const struct file_operations irttp_seq_fops = {
1899 .owner = THIS_MODULE, 1899 .owner = THIS_MODULE,
1900 .open = irttp_seq_open, 1900 .open = irttp_seq_open,
1901 .read = seq_read, 1901 .read = seq_read,