aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio
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/net/hamradio
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/net/hamradio')
-rw-r--r--drivers/net/hamradio/bpqether.c2
-rw-r--r--drivers/net/hamradio/scc.c2
-rw-r--r--drivers/net/hamradio/yam.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 5b788d84011f..d2542697e298 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -459,7 +459,7 @@ static int bpq_info_open(struct inode *inode, struct file *file)
459 return seq_open(file, &bpq_seqops); 459 return seq_open(file, &bpq_seqops);
460} 460}
461 461
462static struct file_operations bpq_info_fops = { 462static const struct file_operations bpq_info_fops = {
463 .owner = THIS_MODULE, 463 .owner = THIS_MODULE,
464 .open = bpq_info_open, 464 .open = bpq_info_open,
465 .read = seq_read, 465 .read = seq_read,
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index 2ce047e9d262..6fdaad5a4577 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -2083,7 +2083,7 @@ static int scc_net_seq_open(struct inode *inode, struct file *file)
2083 return seq_open(file, &scc_net_seq_ops); 2083 return seq_open(file, &scc_net_seq_ops);
2084} 2084}
2085 2085
2086static struct file_operations scc_net_seq_fops = { 2086static const struct file_operations scc_net_seq_fops = {
2087 .owner = THIS_MODULE, 2087 .owner = THIS_MODULE,
2088 .open = scc_net_seq_open, 2088 .open = scc_net_seq_open,
2089 .read = seq_read, 2089 .read = seq_read,
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 6d74f08720d5..08f27119a807 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -804,7 +804,7 @@ static int yam_info_open(struct inode *inode, struct file *file)
804 return seq_open(file, &yam_seqops); 804 return seq_open(file, &yam_seqops);
805} 805}
806 806
807static struct file_operations yam_info_fops = { 807static const struct file_operations yam_info_fops = {
808 .owner = THIS_MODULE, 808 .owner = THIS_MODULE,
809 .open = yam_info_open, 809 .open = yam_info_open,
810 .read = seq_read, 810 .read = seq_read,