aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char
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/s390/char
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/s390/char')
-rw-r--r--drivers/s390/char/fs3270.c2
-rw-r--r--drivers/s390/char/monreader.c2
-rw-r--r--drivers/s390/char/monwriter.c2
-rw-r--r--drivers/s390/char/tape_char.c2
-rw-r--r--drivers/s390/char/tape_proc.c2
-rw-r--r--drivers/s390/char/vmcp.c2
-rw-r--r--drivers/s390/char/vmlogrdr.c2
-rw-r--r--drivers/s390/char/vmwatchdog.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c
index e1a746269c4c..ef36f2132aa4 100644
--- a/drivers/s390/char/fs3270.c
+++ b/drivers/s390/char/fs3270.c
@@ -493,7 +493,7 @@ fs3270_close(struct inode *inode, struct file *filp)
493 return 0; 493 return 0;
494} 494}
495 495
496static struct file_operations fs3270_fops = { 496static const struct file_operations fs3270_fops = {
497 .owner = THIS_MODULE, /* owner */ 497 .owner = THIS_MODULE, /* owner */
498 .read = fs3270_read, /* read */ 498 .read = fs3270_read, /* read */
499 .write = fs3270_write, /* write */ 499 .write = fs3270_write, /* write */
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c
index 3a1a958fb5f2..8df7b1323c05 100644
--- a/drivers/s390/char/monreader.c
+++ b/drivers/s390/char/monreader.c
@@ -547,7 +547,7 @@ static unsigned int mon_poll(struct file *filp, struct poll_table_struct *p)
547 return 0; 547 return 0;
548} 548}
549 549
550static struct file_operations mon_fops = { 550static const struct file_operations mon_fops = {
551 .owner = THIS_MODULE, 551 .owner = THIS_MODULE,
552 .open = &mon_open, 552 .open = &mon_open,
553 .release = &mon_close, 553 .release = &mon_close,
diff --git a/drivers/s390/char/monwriter.c b/drivers/s390/char/monwriter.c
index 9e451acc6491..268598ef3efe 100644
--- a/drivers/s390/char/monwriter.c
+++ b/drivers/s390/char/monwriter.c
@@ -255,7 +255,7 @@ out_error:
255 return rc; 255 return rc;
256} 256}
257 257
258static struct file_operations monwrite_fops = { 258static const struct file_operations monwrite_fops = {
259 .owner = THIS_MODULE, 259 .owner = THIS_MODULE,
260 .open = &monwrite_open, 260 .open = &monwrite_open,
261 .release = &monwrite_close, 261 .release = &monwrite_close,
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c
index 9faea04e11e9..b830a8cbef78 100644
--- a/drivers/s390/char/tape_char.c
+++ b/drivers/s390/char/tape_char.c
@@ -39,7 +39,7 @@ static int tapechar_ioctl(struct inode *, struct file *, unsigned int,
39static long tapechar_compat_ioctl(struct file *, unsigned int, 39static long tapechar_compat_ioctl(struct file *, unsigned int,
40 unsigned long); 40 unsigned long);
41 41
42static struct file_operations tape_fops = 42static const struct file_operations tape_fops =
43{ 43{
44 .owner = THIS_MODULE, 44 .owner = THIS_MODULE,
45 .read = tapechar_read, 45 .read = tapechar_read,
diff --git a/drivers/s390/char/tape_proc.c b/drivers/s390/char/tape_proc.c
index 655d375ab22b..cea49f001f89 100644
--- a/drivers/s390/char/tape_proc.c
+++ b/drivers/s390/char/tape_proc.c
@@ -109,7 +109,7 @@ static int tape_proc_open(struct inode *inode, struct file *file)
109 return seq_open(file, &tape_proc_seq); 109 return seq_open(file, &tape_proc_seq);
110} 110}
111 111
112static struct file_operations tape_proc_ops = 112static const struct file_operations tape_proc_ops =
113{ 113{
114 .open = tape_proc_open, 114 .open = tape_proc_open,
115 .read = seq_read, 115 .read = seq_read,
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c
index a420cd099041..fce3dac5cb3e 100644
--- a/drivers/s390/char/vmcp.c
+++ b/drivers/s390/char/vmcp.c
@@ -173,7 +173,7 @@ static long vmcp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
173 } 173 }
174} 174}
175 175
176static struct file_operations vmcp_fops = { 176static const struct file_operations vmcp_fops = {
177 .owner = THIS_MODULE, 177 .owner = THIS_MODULE,
178 .open = &vmcp_open, 178 .open = &vmcp_open,
179 .release = &vmcp_release, 179 .release = &vmcp_release,
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index 8432a76b961e..b87d3b019936 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -88,7 +88,7 @@ static int vmlogrdr_release(struct inode *, struct file *);
88static ssize_t vmlogrdr_read (struct file *filp, char __user *data, 88static ssize_t vmlogrdr_read (struct file *filp, char __user *data,
89 size_t count, loff_t * ppos); 89 size_t count, loff_t * ppos);
90 90
91static struct file_operations vmlogrdr_fops = { 91static const struct file_operations vmlogrdr_fops = {
92 .owner = THIS_MODULE, 92 .owner = THIS_MODULE,
93 .open = vmlogrdr_open, 93 .open = vmlogrdr_open,
94 .release = vmlogrdr_release, 94 .release = vmlogrdr_release,
diff --git a/drivers/s390/char/vmwatchdog.c b/drivers/s390/char/vmwatchdog.c
index 4b868f72fe89..680b9b58b80e 100644
--- a/drivers/s390/char/vmwatchdog.c
+++ b/drivers/s390/char/vmwatchdog.c
@@ -228,7 +228,7 @@ static ssize_t vmwdt_write(struct file *f, const char __user *buf,
228 return count; 228 return count;
229} 229}
230 230
231static struct file_operations vmwdt_fops = { 231static const struct file_operations vmwdt_fops = {
232 .open = &vmwdt_open, 232 .open = &vmwdt_open,
233 .release = &vmwdt_close, 233 .release = &vmwdt_close,
234 .ioctl = &vmwdt_ioctl, 234 .ioctl = &vmwdt_ioctl,