aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:32 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commit2b8693c0617e972fc0b2fd1ebf8de97e15b656c3 (patch)
tree3eb7dfbc8d5e4031e4992bdd566e211f5ada71f3 /drivers/isdn
parent5dfe4c964a0dd7bb3a1d64a4166835a153146207 (diff)
[PATCH] mark struct file_operations const 3
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/isdn')
-rw-r--r--drivers/isdn/capi/capi.c2
-rw-r--r--drivers/isdn/capi/kcapi_proc.c10
-rw-r--r--drivers/isdn/divert/divert_procfs.c2
-rw-r--r--drivers/isdn/hardware/eicon/divamnt.c2
-rw-r--r--drivers/isdn/hardware/eicon/divasi.c2
-rw-r--r--drivers/isdn/hardware/eicon/divasmain.c2
-rw-r--r--drivers/isdn/hardware/eicon/divasproc.c2
-rw-r--r--drivers/isdn/hysdn/hysdn_procconf.c2
-rw-r--r--drivers/isdn/hysdn/hysdn_proclog.c2
-rw-r--r--drivers/isdn/i4l/isdn_common.c2
10 files changed, 14 insertions, 14 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 9e48bb5a3c0..db1260f73f1 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1003,7 +1003,7 @@ capi_release(struct inode *inode, struct file *file)
1003 return 0; 1003 return 0;
1004} 1004}
1005 1005
1006static struct file_operations capi_fops = 1006static const struct file_operations capi_fops =
1007{ 1007{
1008 .owner = THIS_MODULE, 1008 .owner = THIS_MODULE,
1009 .llseek = no_llseek, 1009 .llseek = no_llseek,
diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c
index ca9dc00a45c..31f4fd8b8b0 100644
--- a/drivers/isdn/capi/kcapi_proc.c
+++ b/drivers/isdn/capi/kcapi_proc.c
@@ -113,14 +113,14 @@ static int seq_contrstats_open(struct inode *inode, struct file *file)
113 return seq_open(file, &seq_contrstats_ops); 113 return seq_open(file, &seq_contrstats_ops);
114} 114}
115 115
116static struct file_operations proc_controller_ops = { 116static const struct file_operations proc_controller_ops = {
117 .open = seq_controller_open, 117 .open = seq_controller_open,
118 .read = seq_read, 118 .read = seq_read,
119 .llseek = seq_lseek, 119 .llseek = seq_lseek,
120 .release = seq_release, 120 .release = seq_release,
121}; 121};
122 122
123static struct file_operations proc_contrstats_ops = { 123static const struct file_operations proc_contrstats_ops = {
124 .open = seq_contrstats_open, 124 .open = seq_contrstats_open,
125 .read = seq_read, 125 .read = seq_read,
126 .llseek = seq_lseek, 126 .llseek = seq_lseek,
@@ -218,14 +218,14 @@ seq_applstats_open(struct inode *inode, struct file *file)
218 return seq_open(file, &seq_applstats_ops); 218 return seq_open(file, &seq_applstats_ops);
219} 219}
220 220
221static struct file_operations proc_applications_ops = { 221static const struct file_operations proc_applications_ops = {
222 .open = seq_applications_open, 222 .open = seq_applications_open,
223 .read = seq_read, 223 .read = seq_read,
224 .llseek = seq_lseek, 224 .llseek = seq_lseek,
225 .release = seq_release, 225 .release = seq_release,
226}; 226};
227 227
228static struct file_operations proc_applstats_ops = { 228static const struct file_operations proc_applstats_ops = {
229 .open = seq_applstats_open, 229 .open = seq_applstats_open,
230 .read = seq_read, 230 .read = seq_read,
231 .llseek = seq_lseek, 231 .llseek = seq_lseek,
@@ -302,7 +302,7 @@ seq_capi_driver_open(struct inode *inode, struct file *file)
302 return err; 302 return err;
303} 303}
304 304
305static struct file_operations proc_driver_ops = { 305static const struct file_operations proc_driver_ops = {
306 .open = seq_capi_driver_open, 306 .open = seq_capi_driver_open,
307 .read = seq_read, 307 .read = seq_read,
308 .llseek = seq_lseek, 308 .llseek = seq_lseek,
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c
index 06967da7c4a..53a18900335 100644
--- a/drivers/isdn/divert/divert_procfs.c
+++ b/drivers/isdn/divert/divert_procfs.c
@@ -256,7 +256,7 @@ isdn_divert_ioctl(struct inode *inode, struct file *file,
256 256
257 257
258#ifdef CONFIG_PROC_FS 258#ifdef CONFIG_PROC_FS
259static struct file_operations isdn_fops = 259static const struct file_operations isdn_fops =
260{ 260{
261 .owner = THIS_MODULE, 261 .owner = THIS_MODULE,
262 .llseek = no_llseek, 262 .llseek = no_llseek,
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c
index 77155d9f399..6b2940ed077 100644
--- a/drivers/isdn/hardware/eicon/divamnt.c
+++ b/drivers/isdn/hardware/eicon/divamnt.c
@@ -164,7 +164,7 @@ static ssize_t divas_maint_read(struct file *file, char __user *buf,
164 return (maint_read_write(buf, (int) count)); 164 return (maint_read_write(buf, (int) count));
165} 165}
166 166
167static struct file_operations divas_maint_fops = { 167static const struct file_operations divas_maint_fops = {
168 .owner = THIS_MODULE, 168 .owner = THIS_MODULE,
169 .llseek = no_llseek, 169 .llseek = no_llseek,
170 .read = divas_maint_read, 170 .read = divas_maint_read,
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c
index fff0d89c806..556b19615bc 100644
--- a/drivers/isdn/hardware/eicon/divasi.c
+++ b/drivers/isdn/hardware/eicon/divasi.c
@@ -131,7 +131,7 @@ static void remove_um_idi_proc(void)
131 } 131 }
132} 132}
133 133
134static struct file_operations divas_idi_fops = { 134static const struct file_operations divas_idi_fops = {
135 .owner = THIS_MODULE, 135 .owner = THIS_MODULE,
136 .llseek = no_llseek, 136 .llseek = no_llseek,
137 .read = um_idi_read, 137 .read = um_idi_read,
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index 91fc92c01af..b365e44072c 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -663,7 +663,7 @@ static unsigned int divas_poll(struct file *file, poll_table * wait)
663 return (POLLIN | POLLRDNORM); 663 return (POLLIN | POLLRDNORM);
664} 664}
665 665
666static struct file_operations divas_fops = { 666static const struct file_operations divas_fops = {
667 .owner = THIS_MODULE, 667 .owner = THIS_MODULE,
668 .llseek = no_llseek, 668 .llseek = no_llseek,
669 .read = divas_read, 669 .read = divas_read,
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c
index 6a4373a4f1e..0632a260699 100644
--- a/drivers/isdn/hardware/eicon/divasproc.c
+++ b/drivers/isdn/hardware/eicon/divasproc.c
@@ -113,7 +113,7 @@ static int divas_close(struct inode *inode, struct file *file)
113 return (0); 113 return (0);
114} 114}
115 115
116static struct file_operations divas_fops = { 116static const struct file_operations divas_fops = {
117 .owner = THIS_MODULE, 117 .owner = THIS_MODULE,
118 .llseek = no_llseek, 118 .llseek = no_llseek,
119 .read = divas_read, 119 .read = divas_read,
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c
index 94a93508911..dc477e0aab0 100644
--- a/drivers/isdn/hysdn/hysdn_procconf.c
+++ b/drivers/isdn/hysdn/hysdn_procconf.c
@@ -367,7 +367,7 @@ hysdn_conf_close(struct inode *ino, struct file *filep)
367/******************************************************/ 367/******************************************************/
368/* table for conf filesystem functions defined above. */ 368/* table for conf filesystem functions defined above. */
369/******************************************************/ 369/******************************************************/
370static struct file_operations conf_fops = 370static const struct file_operations conf_fops =
371{ 371{
372 .llseek = no_llseek, 372 .llseek = no_llseek,
373 .read = hysdn_conf_read, 373 .read = hysdn_conf_read,
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c
index 375d956884d..f7e83a86f44 100644
--- a/drivers/isdn/hysdn/hysdn_proclog.c
+++ b/drivers/isdn/hysdn/hysdn_proclog.c
@@ -383,7 +383,7 @@ hysdn_log_poll(struct file *file, poll_table * wait)
383/**************************************************/ 383/**************************************************/
384/* table for log filesystem functions defined above. */ 384/* table for log filesystem functions defined above. */
385/**************************************************/ 385/**************************************************/
386static struct file_operations log_fops = 386static const struct file_operations log_fops =
387{ 387{
388 .llseek = no_llseek, 388 .llseek = no_llseek,
389 .read = hysdn_log_read, 389 .read = hysdn_log_read,
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 6a2ef0a87ed..9c926e41b11 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -1822,7 +1822,7 @@ isdn_close(struct inode *ino, struct file *filep)
1822 return 0; 1822 return 0;
1823} 1823}
1824 1824
1825static struct file_operations isdn_fops = 1825static const struct file_operations isdn_fops =
1826{ 1826{
1827 .owner = THIS_MODULE, 1827 .owner = THIS_MODULE,
1828 .llseek = no_llseek, 1828 .llseek = no_llseek,