aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
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
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')
-rw-r--r--drivers/s390/block/dasd_eer.c2
-rw-r--r--drivers/s390/block/dasd_proc.c2
-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
-rw-r--r--drivers/s390/cio/blacklist.c2
-rw-r--r--drivers/s390/crypto/zcrypt_api.c2
-rw-r--r--drivers/s390/net/qeth_proc.c4
-rw-r--r--drivers/s390/scsi/zfcp_aux.c2
14 files changed, 15 insertions, 15 deletions
diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c
index 6cedc914077e..4b8a95fba1e5 100644
--- a/drivers/s390/block/dasd_eer.c
+++ b/drivers/s390/block/dasd_eer.c
@@ -650,7 +650,7 @@ static unsigned int dasd_eer_poll(struct file *filp, poll_table *ptable)
650 return mask; 650 return mask;
651} 651}
652 652
653static struct file_operations dasd_eer_fops = { 653static const struct file_operations dasd_eer_fops = {
654 .open = &dasd_eer_open, 654 .open = &dasd_eer_open,
655 .release = &dasd_eer_close, 655 .release = &dasd_eer_close,
656 .read = &dasd_eer_read, 656 .read = &dasd_eer_read,
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c
index 8b7e11815d70..8b3b0f4a157c 100644
--- a/drivers/s390/block/dasd_proc.c
+++ b/drivers/s390/block/dasd_proc.c
@@ -147,7 +147,7 @@ static int dasd_devices_open(struct inode *inode, struct file *file)
147 return seq_open(file, &dasd_devices_seq_ops); 147 return seq_open(file, &dasd_devices_seq_ops);
148} 148}
149 149
150static struct file_operations dasd_devices_file_ops = { 150static const struct file_operations dasd_devices_file_ops = {
151 .open = dasd_devices_open, 151 .open = dasd_devices_open,
152 .read = seq_read, 152 .read = seq_read,
153 .llseek = seq_lseek, 153 .llseek = seq_lseek,
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,
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c
index aa65df4dfced..ec0404874fad 100644
--- a/drivers/s390/cio/blacklist.c
+++ b/drivers/s390/cio/blacklist.c
@@ -364,7 +364,7 @@ cio_ignore_proc_open(struct inode *inode, struct file *file)
364 return seq_open(file, &cio_ignore_proc_seq_ops); 364 return seq_open(file, &cio_ignore_proc_seq_ops);
365} 365}
366 366
367static struct file_operations cio_ignore_proc_fops = { 367static const struct file_operations cio_ignore_proc_fops = {
368 .open = cio_ignore_proc_open, 368 .open = cio_ignore_proc_open,
369 .read = seq_read, 369 .read = seq_read,
370 .llseek = seq_lseek, 370 .llseek = seq_lseek,
diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c
index 2c785148d21e..99761391f340 100644
--- a/drivers/s390/crypto/zcrypt_api.c
+++ b/drivers/s390/crypto/zcrypt_api.c
@@ -807,7 +807,7 @@ static long zcrypt_compat_ioctl(struct file *filp, unsigned int cmd,
807/** 807/**
808 * Misc device file operations. 808 * Misc device file operations.
809 */ 809 */
810static struct file_operations zcrypt_fops = { 810static const struct file_operations zcrypt_fops = {
811 .owner = THIS_MODULE, 811 .owner = THIS_MODULE,
812 .read = zcrypt_read, 812 .read = zcrypt_read,
813 .write = zcrypt_write, 813 .write = zcrypt_write,
diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c
index faa768e59257..81f805cc5ee7 100644
--- a/drivers/s390/net/qeth_proc.c
+++ b/drivers/s390/net/qeth_proc.c
@@ -161,7 +161,7 @@ qeth_procfile_open(struct inode *inode, struct file *file)
161 return seq_open(file, &qeth_procfile_seq_ops); 161 return seq_open(file, &qeth_procfile_seq_ops);
162} 162}
163 163
164static struct file_operations qeth_procfile_fops = { 164static const struct file_operations qeth_procfile_fops = {
165 .owner = THIS_MODULE, 165 .owner = THIS_MODULE,
166 .open = qeth_procfile_open, 166 .open = qeth_procfile_open,
167 .read = seq_read, 167 .read = seq_read,
@@ -273,7 +273,7 @@ qeth_perf_procfile_open(struct inode *inode, struct file *file)
273 return seq_open(file, &qeth_perf_procfile_seq_ops); 273 return seq_open(file, &qeth_perf_procfile_seq_ops);
274} 274}
275 275
276static struct file_operations qeth_perf_procfile_fops = { 276static const struct file_operations qeth_perf_procfile_fops = {
277 .owner = THIS_MODULE, 277 .owner = THIS_MODULE,
278 .open = qeth_perf_procfile_open, 278 .open = qeth_perf_procfile_open,
279 .read = seq_read, 279 .read = seq_read,
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 39a885266790..1f9554e08013 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -60,7 +60,7 @@ static long zfcp_cfdc_dev_ioctl(struct file *, unsigned int, unsigned long);
60 _IOWR(ZFCP_CFDC_IOC_MAGIC, 0, struct zfcp_cfdc_sense_data) 60 _IOWR(ZFCP_CFDC_IOC_MAGIC, 0, struct zfcp_cfdc_sense_data)
61 61
62 62
63static struct file_operations zfcp_cfdc_fops = { 63static const struct file_operations zfcp_cfdc_fops = {
64 .unlocked_ioctl = zfcp_cfdc_dev_ioctl, 64 .unlocked_ioctl = zfcp_cfdc_dev_ioctl,
65#ifdef CONFIG_COMPAT 65#ifdef CONFIG_COMPAT
66 .compat_ioctl = zfcp_cfdc_dev_ioctl 66 .compat_ioctl = zfcp_cfdc_dev_ioctl