aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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
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')
-rw-r--r--drivers/acorn/char/i2c.c2
-rw-r--r--drivers/block/DAC960.c2
-rw-r--r--drivers/block/acsi_slm.c2
-rw-r--r--drivers/block/aoe/aoechr.c2
-rw-r--r--drivers/block/paride/pg.c2
-rw-r--r--drivers/block/paride/pt.c2
-rw-r--r--drivers/block/pktcdvd.c6
-rw-r--r--drivers/bluetooth/hci_vhci.c2
-rw-r--r--drivers/cdrom/viocd.c2
-rw-r--r--drivers/char/briq_panel.c2
-rw-r--r--drivers/char/drm/drm_drv.c2
-rw-r--r--drivers/char/drm/i810_dma.c2
-rw-r--r--drivers/char/drm/i830_dma.c2
-rw-r--r--drivers/char/generic_nvram.c2
-rw-r--r--drivers/char/mbcs.c2
-rw-r--r--drivers/char/mspec.c6
-rw-r--r--drivers/char/random.c4
-rw-r--r--drivers/char/tpm/tpm_bios.c4
-rw-r--r--drivers/char/viotape.c2
-rw-r--r--drivers/char/watchdog/iTCO_wdt.c2
-rw-r--r--drivers/char/watchdog/omap_wdt.c2
-rw-r--r--drivers/char/watchdog/pc87413_wdt.c2
-rw-r--r--drivers/char/watchdog/pnx4008_wdt.c2
-rw-r--r--drivers/char/watchdog/rm9k_wdt.c2
-rw-r--r--drivers/char/watchdog/smsc37b787_wdt.c2
-rw-r--r--drivers/char/watchdog/w83697hf_wdt.c2
-rw-r--r--drivers/i2c/chips/tps65010.c2
-rw-r--r--drivers/i2c/i2c-dev.c2
-rw-r--r--drivers/ide/ide-proc.c2
-rw-r--r--drivers/ide/ide-tape.c2
-rw-r--r--drivers/ieee1394/dv1394.c2
-rw-r--r--drivers/ieee1394/raw1394.c2
-rw-r--r--drivers/ieee1394/video1394.c2
-rw-r--r--drivers/infiniband/core/ucm.c2
-rw-r--r--drivers/infiniband/core/ucma.c2
-rw-r--r--drivers/infiniband/core/user_mad.c4
-rw-r--r--drivers/infiniband/core/uverbs_main.c6
-rw-r--r--drivers/infiniband/hw/ipath/ipath_diag.c4
-rw-r--r--drivers/infiniband/hw/ipath/ipath_file_ops.c6
-rw-r--r--drivers/infiniband/hw/ipath/ipath_fs.c14
-rw-r--r--drivers/infiniband/hw/ipath/ipath_kernel.h2
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_fs.c4
-rw-r--r--drivers/input/input.c6
-rw-r--r--drivers/input/misc/hp_sdc_rtc.c2
-rw-r--r--drivers/input/misc/uinput.c2
-rw-r--r--drivers/input/serio/serio_raw.c2
-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
56 files changed, 81 insertions, 81 deletions
diff --git a/drivers/acorn/char/i2c.c b/drivers/acorn/char/i2c.c
index 9e584a7af434..157d8b73bb64 100644
--- a/drivers/acorn/char/i2c.c
+++ b/drivers/acorn/char/i2c.c
@@ -238,7 +238,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file,
238 return -EINVAL; 238 return -EINVAL;
239} 239}
240 240
241static struct file_operations rtc_fops = { 241static const struct file_operations rtc_fops = {
242 .ioctl = rtc_ioctl, 242 .ioctl = rtc_ioctl,
243}; 243};
244 244
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 7b2fa3d8f61c..92bf868ca056 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -7024,7 +7024,7 @@ static int DAC960_gam_ioctl(struct inode *inode, struct file *file,
7024 return -EINVAL; 7024 return -EINVAL;
7025} 7025}
7026 7026
7027static struct file_operations DAC960_gam_fops = { 7027static const struct file_operations DAC960_gam_fops = {
7028 .owner = THIS_MODULE, 7028 .owner = THIS_MODULE,
7029 .ioctl = DAC960_gam_ioctl 7029 .ioctl = DAC960_gam_ioctl
7030}; 7030};
diff --git a/drivers/block/acsi_slm.c b/drivers/block/acsi_slm.c
index e04be94d195c..e2e043290963 100644
--- a/drivers/block/acsi_slm.c
+++ b/drivers/block/acsi_slm.c
@@ -269,7 +269,7 @@ static int slm_get_pagesize( int device, int *w, int *h );
269 269
270static DEFINE_TIMER(slm_timer, slm_test_ready, 0, 0); 270static DEFINE_TIMER(slm_timer, slm_test_ready, 0, 0);
271 271
272static struct file_operations slm_fops = { 272static const struct file_operations slm_fops = {
273 .owner = THIS_MODULE, 273 .owner = THIS_MODULE,
274 .read = slm_read, 274 .read = slm_read,
275 .write = slm_write, 275 .write = slm_write,
diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
index e22b4c9520a9..39e563ea0878 100644
--- a/drivers/block/aoe/aoechr.c
+++ b/drivers/block/aoe/aoechr.c
@@ -233,7 +233,7 @@ loop:
233 } 233 }
234} 234}
235 235
236static struct file_operations aoe_fops = { 236static const struct file_operations aoe_fops = {
237 .write = aoechr_write, 237 .write = aoechr_write,
238 .read = aoechr_read, 238 .read = aoechr_read,
239 .open = aoechr_open, 239 .open = aoechr_open,
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index 9970aedbb5d9..d89e7d32a3b6 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -227,7 +227,7 @@ static struct class *pg_class;
227 227
228/* kernel glue structures */ 228/* kernel glue structures */
229 229
230static struct file_operations pg_fops = { 230static const struct file_operations pg_fops = {
231 .owner = THIS_MODULE, 231 .owner = THIS_MODULE,
232 .read = pg_read, 232 .read = pg_read,
233 .write = pg_write, 233 .write = pg_write,
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
index c902b25e4869..9f4e67ee1eb0 100644
--- a/drivers/block/paride/pt.c
+++ b/drivers/block/paride/pt.c
@@ -232,7 +232,7 @@ static char pt_scratch[512]; /* scratch block buffer */
232 232
233/* kernel glue structures */ 233/* kernel glue structures */
234 234
235static struct file_operations pt_fops = { 235static const struct file_operations pt_fops = {
236 .owner = THIS_MODULE, 236 .owner = THIS_MODULE,
237 .read = pt_read, 237 .read = pt_read,
238 .write = pt_write, 238 .write = pt_write,
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index c0e89490e3d5..93fb6ed4ed52 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -435,7 +435,7 @@ static int pkt_debugfs_fops_open(struct inode *inode, struct file *file)
435 return single_open(file, pkt_debugfs_seq_show, inode->i_private); 435 return single_open(file, pkt_debugfs_seq_show, inode->i_private);
436} 436}
437 437
438static struct file_operations debug_fops = { 438static const struct file_operations debug_fops = {
439 .open = pkt_debugfs_fops_open, 439 .open = pkt_debugfs_fops_open,
440 .read = seq_read, 440 .read = seq_read,
441 .llseek = seq_lseek, 441 .llseek = seq_lseek,
@@ -2725,7 +2725,7 @@ static int pkt_seq_open(struct inode *inode, struct file *file)
2725 return single_open(file, pkt_seq_show, PDE(inode)->data); 2725 return single_open(file, pkt_seq_show, PDE(inode)->data);
2726} 2726}
2727 2727
2728static struct file_operations pkt_proc_fops = { 2728static const struct file_operations pkt_proc_fops = {
2729 .open = pkt_seq_open, 2729 .open = pkt_seq_open,
2730 .read = seq_read, 2730 .read = seq_read,
2731 .llseek = seq_lseek, 2731 .llseek = seq_lseek,
@@ -3052,7 +3052,7 @@ static int pkt_ctl_ioctl(struct inode *inode, struct file *file, unsigned int cm
3052} 3052}
3053 3053
3054 3054
3055static struct file_operations pkt_ctl_fops = { 3055static const struct file_operations pkt_ctl_fops = {
3056 .ioctl = pkt_ctl_ioctl, 3056 .ioctl = pkt_ctl_ioctl,
3057 .owner = THIS_MODULE, 3057 .owner = THIS_MODULE,
3058}; 3058};
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index a278d98a9151..b71a5ccc587f 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -332,7 +332,7 @@ static int vhci_fasync(int fd, struct file *file, int on)
332 return 0; 332 return 0;
333} 333}
334 334
335static struct file_operations vhci_fops = { 335static const struct file_operations vhci_fops = {
336 .owner = THIS_MODULE, 336 .owner = THIS_MODULE,
337 .llseek = vhci_llseek, 337 .llseek = vhci_llseek,
338 .read = vhci_read, 338 .read = vhci_read,
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index 93fbf84dcc4a..dc13ebacedfb 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -176,7 +176,7 @@ static int proc_viocd_open(struct inode *inode, struct file *file)
176 return single_open(file, proc_viocd_show, NULL); 176 return single_open(file, proc_viocd_show, NULL);
177} 177}
178 178
179static struct file_operations proc_viocd_operations = { 179static const struct file_operations proc_viocd_operations = {
180 .open = proc_viocd_open, 180 .open = proc_viocd_open,
181 .read = seq_read, 181 .read = seq_read,
182 .llseek = seq_lseek, 182 .llseek = seq_lseek,
diff --git a/drivers/char/briq_panel.c b/drivers/char/briq_panel.c
index 9f8082f8dd29..7f60a18ef76b 100644
--- a/drivers/char/briq_panel.c
+++ b/drivers/char/briq_panel.c
@@ -187,7 +187,7 @@ static ssize_t briq_panel_write(struct file *file, const char __user *buf, size_
187 return len; 187 return len;
188} 188}
189 189
190static struct file_operations briq_panel_fops = { 190static const struct file_operations briq_panel_fops = {
191 .owner = THIS_MODULE, 191 .owner = THIS_MODULE,
192 .read = briq_panel_read, 192 .read = briq_panel_read,
193 .write = briq_panel_write, 193 .write = briq_panel_write,
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c
index a70af0de4453..f5b9b2480c14 100644
--- a/drivers/char/drm/drm_drv.c
+++ b/drivers/char/drm/drm_drv.c
@@ -371,7 +371,7 @@ void drm_exit(struct drm_driver *driver)
371EXPORT_SYMBOL(drm_exit); 371EXPORT_SYMBOL(drm_exit);
372 372
373/** File operations structure */ 373/** File operations structure */
374static struct file_operations drm_stub_fops = { 374static const struct file_operations drm_stub_fops = {
375 .owner = THIS_MODULE, 375 .owner = THIS_MODULE,
376 .open = drm_stub_open 376 .open = drm_stub_open
377}; 377};
diff --git a/drivers/char/drm/i810_dma.c b/drivers/char/drm/i810_dma.c
index 60cb4e45a75e..603d17fd2d69 100644
--- a/drivers/char/drm/i810_dma.c
+++ b/drivers/char/drm/i810_dma.c
@@ -112,7 +112,7 @@ static int i810_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
112 return 0; 112 return 0;
113} 113}
114 114
115static struct file_operations i810_buffer_fops = { 115static const struct file_operations i810_buffer_fops = {
116 .open = drm_open, 116 .open = drm_open,
117 .release = drm_release, 117 .release = drm_release,
118 .ioctl = drm_ioctl, 118 .ioctl = drm_ioctl,
diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c
index 95224455ec0c..3314a9fea9e5 100644
--- a/drivers/char/drm/i830_dma.c
+++ b/drivers/char/drm/i830_dma.c
@@ -114,7 +114,7 @@ static int i830_mmap_buffers(struct file *filp, struct vm_area_struct *vma)
114 return 0; 114 return 0;
115} 115}
116 116
117static struct file_operations i830_buffer_fops = { 117static const struct file_operations i830_buffer_fops = {
118 .open = drm_open, 118 .open = drm_open,
119 .release = drm_release, 119 .release = drm_release,
120 .ioctl = drm_ioctl, 120 .ioctl = drm_ioctl,
diff --git a/drivers/char/generic_nvram.c b/drivers/char/generic_nvram.c
index 43ff59816511..2398e864c28d 100644
--- a/drivers/char/generic_nvram.c
+++ b/drivers/char/generic_nvram.c
@@ -117,7 +117,7 @@ static int nvram_ioctl(struct inode *inode, struct file *file,
117 return 0; 117 return 0;
118} 118}
119 119
120struct file_operations nvram_fops = { 120const struct file_operations nvram_fops = {
121 .owner = THIS_MODULE, 121 .owner = THIS_MODULE,
122 .llseek = nvram_llseek, 122 .llseek = nvram_llseek,
123 .read = read_nvram, 123 .read = read_nvram,
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
index 0afb7ba999cf..57f9115a456c 100644
--- a/drivers/char/mbcs.c
+++ b/drivers/char/mbcs.c
@@ -46,7 +46,7 @@ LIST_HEAD(soft_list);
46/* 46/*
47 * file operations 47 * file operations
48 */ 48 */
49struct file_operations mbcs_ops = { 49const struct file_operations mbcs_ops = {
50 .open = mbcs_open, 50 .open = mbcs_open,
51 .llseek = mbcs_sram_llseek, 51 .llseek = mbcs_sram_llseek,
52 .read = mbcs_sram_read, 52 .read = mbcs_sram_read,
diff --git a/drivers/char/mspec.c b/drivers/char/mspec.c
index 235e89226112..7ac30612068b 100644
--- a/drivers/char/mspec.c
+++ b/drivers/char/mspec.c
@@ -291,7 +291,7 @@ uncached_mmap(struct file *file, struct vm_area_struct *vma)
291 return mspec_mmap(file, vma, MSPEC_UNCACHED); 291 return mspec_mmap(file, vma, MSPEC_UNCACHED);
292} 292}
293 293
294static struct file_operations fetchop_fops = { 294static const struct file_operations fetchop_fops = {
295 .owner = THIS_MODULE, 295 .owner = THIS_MODULE,
296 .mmap = fetchop_mmap 296 .mmap = fetchop_mmap
297}; 297};
@@ -302,7 +302,7 @@ static struct miscdevice fetchop_miscdev = {
302 .fops = &fetchop_fops 302 .fops = &fetchop_fops
303}; 303};
304 304
305static struct file_operations cached_fops = { 305static const struct file_operations cached_fops = {
306 .owner = THIS_MODULE, 306 .owner = THIS_MODULE,
307 .mmap = cached_mmap 307 .mmap = cached_mmap
308}; 308};
@@ -313,7 +313,7 @@ static struct miscdevice cached_miscdev = {
313 .fops = &cached_fops 313 .fops = &cached_fops
314}; 314};
315 315
316static struct file_operations uncached_fops = { 316static const struct file_operations uncached_fops = {
317 .owner = THIS_MODULE, 317 .owner = THIS_MODULE,
318 .mmap = uncached_mmap 318 .mmap = uncached_mmap
319}; 319};
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 13d0b1350a62..b9dc7aa1dfb3 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1117,14 +1117,14 @@ random_ioctl(struct inode * inode, struct file * file,
1117 } 1117 }
1118} 1118}
1119 1119
1120struct file_operations random_fops = { 1120const struct file_operations random_fops = {
1121 .read = random_read, 1121 .read = random_read,
1122 .write = random_write, 1122 .write = random_write,
1123 .poll = random_poll, 1123 .poll = random_poll,
1124 .ioctl = random_ioctl, 1124 .ioctl = random_ioctl,
1125}; 1125};
1126 1126
1127struct file_operations urandom_fops = { 1127const struct file_operations urandom_fops = {
1128 .read = urandom_read, 1128 .read = urandom_read,
1129 .write = random_write, 1129 .write = random_write,
1130 .ioctl = random_ioctl, 1130 .ioctl = random_ioctl,
diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c
index 7fca5f470beb..4eba32b23b29 100644
--- a/drivers/char/tpm/tpm_bios.c
+++ b/drivers/char/tpm/tpm_bios.c
@@ -441,7 +441,7 @@ static int tpm_ascii_bios_measurements_open(struct inode *inode,
441 return err; 441 return err;
442} 442}
443 443
444struct file_operations tpm_ascii_bios_measurements_ops = { 444const struct file_operations tpm_ascii_bios_measurements_ops = {
445 .open = tpm_ascii_bios_measurements_open, 445 .open = tpm_ascii_bios_measurements_open,
446 .read = seq_read, 446 .read = seq_read,
447 .llseek = seq_lseek, 447 .llseek = seq_lseek,
@@ -474,7 +474,7 @@ static int tpm_binary_bios_measurements_open(struct inode *inode,
474 return err; 474 return err;
475} 475}
476 476
477struct file_operations tpm_binary_bios_measurements_ops = { 477const struct file_operations tpm_binary_bios_measurements_ops = {
478 .open = tpm_binary_bios_measurements_open, 478 .open = tpm_binary_bios_measurements_open,
479 .read = seq_read, 479 .read = seq_read,
480 .llseek = seq_lseek, 480 .llseek = seq_lseek,
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index 9438512b17f1..13faf8d17482 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -872,7 +872,7 @@ free_op:
872 return ret; 872 return ret;
873} 873}
874 874
875struct file_operations viotap_fops = { 875const struct file_operations viotap_fops = {
876 owner: THIS_MODULE, 876 owner: THIS_MODULE,
877 read: viotap_read, 877 read: viotap_read,
878 write: viotap_write, 878 write: viotap_write,
diff --git a/drivers/char/watchdog/iTCO_wdt.c b/drivers/char/watchdog/iTCO_wdt.c
index 7eac922df867..fd8a44a08cd3 100644
--- a/drivers/char/watchdog/iTCO_wdt.c
+++ b/drivers/char/watchdog/iTCO_wdt.c
@@ -539,7 +539,7 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file,
539 * Kernel Interfaces 539 * Kernel Interfaces
540 */ 540 */
541 541
542static struct file_operations iTCO_wdt_fops = { 542static const struct file_operations iTCO_wdt_fops = {
543 .owner = THIS_MODULE, 543 .owner = THIS_MODULE,
544 .llseek = no_llseek, 544 .llseek = no_llseek,
545 .write = iTCO_wdt_write, 545 .write = iTCO_wdt_write,
diff --git a/drivers/char/watchdog/omap_wdt.c b/drivers/char/watchdog/omap_wdt.c
index 6c6f97332dbb..84074a697dce 100644
--- a/drivers/char/watchdog/omap_wdt.c
+++ b/drivers/char/watchdog/omap_wdt.c
@@ -230,7 +230,7 @@ omap_wdt_ioctl(struct inode *inode, struct file *file,
230 } 230 }
231} 231}
232 232
233static struct file_operations omap_wdt_fops = { 233static const struct file_operations omap_wdt_fops = {
234 .owner = THIS_MODULE, 234 .owner = THIS_MODULE,
235 .write = omap_wdt_write, 235 .write = omap_wdt_write,
236 .ioctl = omap_wdt_ioctl, 236 .ioctl = omap_wdt_ioctl,
diff --git a/drivers/char/watchdog/pc87413_wdt.c b/drivers/char/watchdog/pc87413_wdt.c
index 1d447e32af41..a77a90717ad2 100644
--- a/drivers/char/watchdog/pc87413_wdt.c
+++ b/drivers/char/watchdog/pc87413_wdt.c
@@ -526,7 +526,7 @@ static int pc87413_notify_sys(struct notifier_block *this,
526 526
527/* -- Module's structures ---------------------------------------*/ 527/* -- Module's structures ---------------------------------------*/
528 528
529static struct file_operations pc87413_fops = { 529static const struct file_operations pc87413_fops = {
530 .owner = THIS_MODULE, 530 .owner = THIS_MODULE,
531 .llseek = no_llseek, 531 .llseek = no_llseek,
532 .write = pc87413_write, 532 .write = pc87413_write,
diff --git a/drivers/char/watchdog/pnx4008_wdt.c b/drivers/char/watchdog/pnx4008_wdt.c
index 3a55fc6abcd8..ff6f1ca1e5e7 100644
--- a/drivers/char/watchdog/pnx4008_wdt.c
+++ b/drivers/char/watchdog/pnx4008_wdt.c
@@ -238,7 +238,7 @@ static int pnx4008_wdt_release(struct inode *inode, struct file *file)
238 return 0; 238 return 0;
239} 239}
240 240
241static struct file_operations pnx4008_wdt_fops = { 241static const struct file_operations pnx4008_wdt_fops = {
242 .owner = THIS_MODULE, 242 .owner = THIS_MODULE,
243 .llseek = no_llseek, 243 .llseek = no_llseek,
244 .write = pnx4008_wdt_write, 244 .write = pnx4008_wdt_write,
diff --git a/drivers/char/watchdog/rm9k_wdt.c b/drivers/char/watchdog/rm9k_wdt.c
index 7576a13e86bc..b4678839d3bb 100644
--- a/drivers/char/watchdog/rm9k_wdt.c
+++ b/drivers/char/watchdog/rm9k_wdt.c
@@ -95,7 +95,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be disabled once started");
95 95
96 96
97/* Kernel interfaces */ 97/* Kernel interfaces */
98static struct file_operations fops = { 98static const struct file_operations fops = {
99 .owner = THIS_MODULE, 99 .owner = THIS_MODULE,
100 .open = wdt_gpi_open, 100 .open = wdt_gpi_open,
101 .release = wdt_gpi_release, 101 .release = wdt_gpi_release,
diff --git a/drivers/char/watchdog/smsc37b787_wdt.c b/drivers/char/watchdog/smsc37b787_wdt.c
index 9f56913b484f..a9681d580dd3 100644
--- a/drivers/char/watchdog/smsc37b787_wdt.c
+++ b/drivers/char/watchdog/smsc37b787_wdt.c
@@ -510,7 +510,7 @@ static int wb_smsc_wdt_notify_sys(struct notifier_block *this, unsigned long cod
510 510
511/* -- Module's structures ---------------------------------------*/ 511/* -- Module's structures ---------------------------------------*/
512 512
513static struct file_operations wb_smsc_wdt_fops = 513static const struct file_operations wb_smsc_wdt_fops =
514{ 514{
515 .owner = THIS_MODULE, 515 .owner = THIS_MODULE,
516 .llseek = no_llseek, 516 .llseek = no_llseek,
diff --git a/drivers/char/watchdog/w83697hf_wdt.c b/drivers/char/watchdog/w83697hf_wdt.c
index 7768b55487c8..c960ec110dd7 100644
--- a/drivers/char/watchdog/w83697hf_wdt.c
+++ b/drivers/char/watchdog/w83697hf_wdt.c
@@ -323,7 +323,7 @@ wdt_notify_sys(struct notifier_block *this, unsigned long code,
323 * Kernel Interfaces 323 * Kernel Interfaces
324 */ 324 */
325 325
326static struct file_operations wdt_fops = { 326static const struct file_operations wdt_fops = {
327 .owner = THIS_MODULE, 327 .owner = THIS_MODULE,
328 .llseek = no_llseek, 328 .llseek = no_llseek,
329 .write = wdt_write, 329 .write = wdt_write,
diff --git a/drivers/i2c/chips/tps65010.c b/drivers/i2c/chips/tps65010.c
index 4ee56def61f2..214fbb1423c5 100644
--- a/drivers/i2c/chips/tps65010.c
+++ b/drivers/i2c/chips/tps65010.c
@@ -308,7 +308,7 @@ static int dbg_tps_open(struct inode *inode, struct file *file)
308 return single_open(file, dbg_show, inode->i_private); 308 return single_open(file, dbg_show, inode->i_private);
309} 309}
310 310
311static struct file_operations debug_fops = { 311static const struct file_operations debug_fops = {
312 .open = dbg_tps_open, 312 .open = dbg_tps_open,
313 .read = seq_read, 313 .read = seq_read,
314 .llseek = seq_lseek, 314 .llseek = seq_lseek,
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index ac5bd2a7ca99..cb4fa9bef8cd 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -392,7 +392,7 @@ static int i2cdev_release(struct inode *inode, struct file *file)
392 return 0; 392 return 0;
393} 393}
394 394
395static struct file_operations i2cdev_fops = { 395static const struct file_operations i2cdev_fops = {
396 .owner = THIS_MODULE, 396 .owner = THIS_MODULE,
397 .llseek = no_llseek, 397 .llseek = no_llseek,
398 .read = i2cdev_read, 398 .read = i2cdev_read,
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index ad49bd823ebd..30a5780f4185 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -548,7 +548,7 @@ static int ide_drivers_open(struct inode *inode, struct file *file)
548 return single_open(file, &ide_drivers_show, NULL); 548 return single_open(file, &ide_drivers_show, NULL);
549} 549}
550 550
551static struct file_operations ide_drivers_operations = { 551static const struct file_operations ide_drivers_operations = {
552 .open = ide_drivers_open, 552 .open = ide_drivers_open,
553 .read = seq_read, 553 .read = seq_read,
554 .llseek = seq_lseek, 554 .llseek = seq_lseek,
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index b3bcd1d7315e..c6eec0413a6c 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -4779,7 +4779,7 @@ static ide_driver_t idetape_driver = {
4779/* 4779/*
4780 * Our character device supporting functions, passed to register_chrdev. 4780 * Our character device supporting functions, passed to register_chrdev.
4781 */ 4781 */
4782static struct file_operations idetape_fops = { 4782static const struct file_operations idetape_fops = {
4783 .owner = THIS_MODULE, 4783 .owner = THIS_MODULE,
4784 .read = idetape_chrdev_read, 4784 .read = idetape_chrdev_read,
4785 .write = idetape_chrdev_write, 4785 .write = idetape_chrdev_write,
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
index 55d6ae664fd6..dee9529aa8e7 100644
--- a/drivers/ieee1394/dv1394.c
+++ b/drivers/ieee1394/dv1394.c
@@ -2147,7 +2147,7 @@ out:
2147} 2147}
2148 2148
2149static struct cdev dv1394_cdev; 2149static struct cdev dv1394_cdev;
2150static struct file_operations dv1394_fops= 2150static const struct file_operations dv1394_fops=
2151{ 2151{
2152 .owner = THIS_MODULE, 2152 .owner = THIS_MODULE,
2153 .poll = dv1394_poll, 2153 .poll = dv1394_poll,
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index a77a832828c8..aa9ca8385ec7 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -3013,7 +3013,7 @@ static struct hpsb_highlevel raw1394_highlevel = {
3013}; 3013};
3014 3014
3015static struct cdev raw1394_cdev; 3015static struct cdev raw1394_cdev;
3016static struct file_operations raw1394_fops = { 3016static const struct file_operations raw1394_fops = {
3017 .owner = THIS_MODULE, 3017 .owner = THIS_MODULE,
3018 .read = raw1394_read, 3018 .read = raw1394_read,
3019 .write = raw1394_write, 3019 .write = raw1394_write,
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
index f4d1ec00af65..95ca26d75272 100644
--- a/drivers/ieee1394/video1394.c
+++ b/drivers/ieee1394/video1394.c
@@ -1277,7 +1277,7 @@ static long video1394_compat_ioctl(struct file *f, unsigned cmd, unsigned long a
1277#endif 1277#endif
1278 1278
1279static struct cdev video1394_cdev; 1279static struct cdev video1394_cdev;
1280static struct file_operations video1394_fops= 1280static const struct file_operations video1394_fops=
1281{ 1281{
1282 .owner = THIS_MODULE, 1282 .owner = THIS_MODULE,
1283 .unlocked_ioctl = video1394_ioctl, 1283 .unlocked_ioctl = video1394_ioctl,
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
index f15220a0ee75..ee51d79a7ad5 100644
--- a/drivers/infiniband/core/ucm.c
+++ b/drivers/infiniband/core/ucm.c
@@ -1221,7 +1221,7 @@ static void ib_ucm_release_class_dev(struct class_device *class_dev)
1221 kfree(dev); 1221 kfree(dev);
1222} 1222}
1223 1223
1224static struct file_operations ucm_fops = { 1224static const struct file_operations ucm_fops = {
1225 .owner = THIS_MODULE, 1225 .owner = THIS_MODULE,
1226 .open = ib_ucm_open, 1226 .open = ib_ucm_open,
1227 .release = ib_ucm_close, 1227 .release = ib_ucm_close,
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
index e2e8d329b443..6b81b98961c7 100644
--- a/drivers/infiniband/core/ucma.c
+++ b/drivers/infiniband/core/ucma.c
@@ -833,7 +833,7 @@ static int ucma_close(struct inode *inode, struct file *filp)
833 return 0; 833 return 0;
834} 834}
835 835
836static struct file_operations ucma_fops = { 836static const struct file_operations ucma_fops = {
837 .owner = THIS_MODULE, 837 .owner = THIS_MODULE,
838 .open = ucma_open, 838 .open = ucma_open,
839 .release = ucma_close, 839 .release = ucma_close,
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
index 807fbd6b8414..c069ebeba8e3 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -771,7 +771,7 @@ static int ib_umad_close(struct inode *inode, struct file *filp)
771 return 0; 771 return 0;
772} 772}
773 773
774static struct file_operations umad_fops = { 774static const struct file_operations umad_fops = {
775 .owner = THIS_MODULE, 775 .owner = THIS_MODULE,
776 .read = ib_umad_read, 776 .read = ib_umad_read,
777 .write = ib_umad_write, 777 .write = ib_umad_write,
@@ -846,7 +846,7 @@ static int ib_umad_sm_close(struct inode *inode, struct file *filp)
846 return ret; 846 return ret;
847} 847}
848 848
849static struct file_operations umad_sm_fops = { 849static const struct file_operations umad_sm_fops = {
850 .owner = THIS_MODULE, 850 .owner = THIS_MODULE,
851 .open = ib_umad_sm_open, 851 .open = ib_umad_sm_open,
852 .release = ib_umad_sm_close 852 .release = ib_umad_sm_close
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index a617ca7b6923..f8bc822a3cc3 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -375,7 +375,7 @@ static int ib_uverbs_event_close(struct inode *inode, struct file *filp)
375 return 0; 375 return 0;
376} 376}
377 377
378static struct file_operations uverbs_event_fops = { 378static const struct file_operations uverbs_event_fops = {
379 .owner = THIS_MODULE, 379 .owner = THIS_MODULE,
380 .read = ib_uverbs_event_read, 380 .read = ib_uverbs_event_read,
381 .poll = ib_uverbs_event_poll, 381 .poll = ib_uverbs_event_poll,
@@ -679,14 +679,14 @@ static int ib_uverbs_close(struct inode *inode, struct file *filp)
679 return 0; 679 return 0;
680} 680}
681 681
682static struct file_operations uverbs_fops = { 682static const struct file_operations uverbs_fops = {
683 .owner = THIS_MODULE, 683 .owner = THIS_MODULE,
684 .write = ib_uverbs_write, 684 .write = ib_uverbs_write,
685 .open = ib_uverbs_open, 685 .open = ib_uverbs_open,
686 .release = ib_uverbs_close 686 .release = ib_uverbs_close
687}; 687};
688 688
689static struct file_operations uverbs_mmap_fops = { 689static const struct file_operations uverbs_mmap_fops = {
690 .owner = THIS_MODULE, 690 .owner = THIS_MODULE,
691 .write = ib_uverbs_write, 691 .write = ib_uverbs_write,
692 .mmap = ib_uverbs_mmap, 692 .mmap = ib_uverbs_mmap,
diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c
index 28c087b824c2..0f13a2182cc7 100644
--- a/drivers/infiniband/hw/ipath/ipath_diag.c
+++ b/drivers/infiniband/hw/ipath/ipath_diag.c
@@ -59,7 +59,7 @@ static ssize_t ipath_diag_read(struct file *fp, char __user *data,
59static ssize_t ipath_diag_write(struct file *fp, const char __user *data, 59static ssize_t ipath_diag_write(struct file *fp, const char __user *data,
60 size_t count, loff_t *off); 60 size_t count, loff_t *off);
61 61
62static struct file_operations diag_file_ops = { 62static const struct file_operations diag_file_ops = {
63 .owner = THIS_MODULE, 63 .owner = THIS_MODULE,
64 .write = ipath_diag_write, 64 .write = ipath_diag_write,
65 .read = ipath_diag_read, 65 .read = ipath_diag_read,
@@ -71,7 +71,7 @@ static ssize_t ipath_diagpkt_write(struct file *fp,
71 const char __user *data, 71 const char __user *data,
72 size_t count, loff_t *off); 72 size_t count, loff_t *off);
73 73
74static struct file_operations diagpkt_file_ops = { 74static const struct file_operations diagpkt_file_ops = {
75 .owner = THIS_MODULE, 75 .owner = THIS_MODULE,
76 .write = ipath_diagpkt_write, 76 .write = ipath_diagpkt_write,
77}; 77};
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index b932bcb67a5e..5d64ff875297 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -54,7 +54,7 @@ static ssize_t ipath_write(struct file *, const char __user *, size_t,
54static unsigned int ipath_poll(struct file *, struct poll_table_struct *); 54static unsigned int ipath_poll(struct file *, struct poll_table_struct *);
55static int ipath_mmap(struct file *, struct vm_area_struct *); 55static int ipath_mmap(struct file *, struct vm_area_struct *);
56 56
57static struct file_operations ipath_file_ops = { 57static const struct file_operations ipath_file_ops = {
58 .owner = THIS_MODULE, 58 .owner = THIS_MODULE,
59 .write = ipath_write, 59 .write = ipath_write,
60 .open = ipath_open, 60 .open = ipath_open,
@@ -2153,7 +2153,7 @@ bail:
2153 2153
2154static struct class *ipath_class; 2154static struct class *ipath_class;
2155 2155
2156static int init_cdev(int minor, char *name, struct file_operations *fops, 2156static int init_cdev(int minor, char *name, const struct file_operations *fops,
2157 struct cdev **cdevp, struct class_device **class_devp) 2157 struct cdev **cdevp, struct class_device **class_devp)
2158{ 2158{
2159 const dev_t dev = MKDEV(IPATH_MAJOR, minor); 2159 const dev_t dev = MKDEV(IPATH_MAJOR, minor);
@@ -2210,7 +2210,7 @@ done:
2210 return ret; 2210 return ret;
2211} 2211}
2212 2212
2213int ipath_cdev_init(int minor, char *name, struct file_operations *fops, 2213int ipath_cdev_init(int minor, char *name, const struct file_operations *fops,
2214 struct cdev **cdevp, struct class_device **class_devp) 2214 struct cdev **cdevp, struct class_device **class_devp)
2215{ 2215{
2216 return init_cdev(minor, name, fops, cdevp, class_devp); 2216 return init_cdev(minor, name, fops, cdevp, class_devp);
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
index 79a60f020a21..5b40a846ff95 100644
--- a/drivers/infiniband/hw/ipath/ipath_fs.c
+++ b/drivers/infiniband/hw/ipath/ipath_fs.c
@@ -47,7 +47,7 @@
47static struct super_block *ipath_super; 47static struct super_block *ipath_super;
48 48
49static int ipathfs_mknod(struct inode *dir, struct dentry *dentry, 49static int ipathfs_mknod(struct inode *dir, struct dentry *dentry,
50 int mode, struct file_operations *fops, 50 int mode, const struct file_operations *fops,
51 void *data) 51 void *data)
52{ 52{
53 int error; 53 int error;
@@ -81,7 +81,7 @@ bail:
81 81
82static int create_file(const char *name, mode_t mode, 82static int create_file(const char *name, mode_t mode,
83 struct dentry *parent, struct dentry **dentry, 83 struct dentry *parent, struct dentry **dentry,
84 struct file_operations *fops, void *data) 84 const struct file_operations *fops, void *data)
85{ 85{
86 int error; 86 int error;
87 87
@@ -105,7 +105,7 @@ static ssize_t atomic_stats_read(struct file *file, char __user *buf,
105 sizeof ipath_stats); 105 sizeof ipath_stats);
106} 106}
107 107
108static struct file_operations atomic_stats_ops = { 108static const struct file_operations atomic_stats_ops = {
109 .read = atomic_stats_read, 109 .read = atomic_stats_read,
110}; 110};
111 111
@@ -127,7 +127,7 @@ static ssize_t atomic_counters_read(struct file *file, char __user *buf,
127 sizeof counters); 127 sizeof counters);
128} 128}
129 129
130static struct file_operations atomic_counters_ops = { 130static const struct file_operations atomic_counters_ops = {
131 .read = atomic_counters_read, 131 .read = atomic_counters_read,
132}; 132};
133 133
@@ -166,7 +166,7 @@ static ssize_t atomic_node_info_read(struct file *file, char __user *buf,
166 sizeof nodeinfo); 166 sizeof nodeinfo);
167} 167}
168 168
169static struct file_operations atomic_node_info_ops = { 169static const struct file_operations atomic_node_info_ops = {
170 .read = atomic_node_info_read, 170 .read = atomic_node_info_read,
171}; 171};
172 172
@@ -291,7 +291,7 @@ static ssize_t atomic_port_info_read(struct file *file, char __user *buf,
291 sizeof portinfo); 291 sizeof portinfo);
292} 292}
293 293
294static struct file_operations atomic_port_info_ops = { 294static const struct file_operations atomic_port_info_ops = {
295 .read = atomic_port_info_read, 295 .read = atomic_port_info_read,
296}; 296};
297 297
@@ -394,7 +394,7 @@ bail:
394 return ret; 394 return ret;
395} 395}
396 396
397static struct file_operations flash_ops = { 397static const struct file_operations flash_ops = {
398 .read = flash_read, 398 .read = flash_read,
399 .write = flash_write, 399 .write = flash_write,
400}; 400};
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h
index 986b2125b8f5..6d8d05fb5999 100644
--- a/drivers/infiniband/hw/ipath/ipath_kernel.h
+++ b/drivers/infiniband/hw/ipath/ipath_kernel.h
@@ -593,7 +593,7 @@ void ipath_shutdown_device(struct ipath_devdata *);
593void ipath_disarm_senderrbufs(struct ipath_devdata *); 593void ipath_disarm_senderrbufs(struct ipath_devdata *);
594 594
595struct file_operations; 595struct file_operations;
596int ipath_cdev_init(int minor, char *name, struct file_operations *fops, 596int ipath_cdev_init(int minor, char *name, const struct file_operations *fops,
597 struct cdev **cdevp, struct class_device **class_devp); 597 struct cdev **cdevp, struct class_device **class_devp);
598void ipath_cdev_cleanup(struct cdev **cdevp, 598void ipath_cdev_cleanup(struct cdev **cdevp,
599 struct class_device **class_devp); 599 struct class_device **class_devp);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_fs.c b/drivers/infiniband/ulp/ipoib/ipoib_fs.c
index f1cb83688b31..44c174182a82 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_fs.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_fs.c
@@ -146,7 +146,7 @@ static int ipoib_mcg_open(struct inode *inode, struct file *file)
146 return 0; 146 return 0;
147} 147}
148 148
149static struct file_operations ipoib_mcg_fops = { 149static const struct file_operations ipoib_mcg_fops = {
150 .owner = THIS_MODULE, 150 .owner = THIS_MODULE,
151 .open = ipoib_mcg_open, 151 .open = ipoib_mcg_open,
152 .read = seq_read, 152 .read = seq_read,
@@ -252,7 +252,7 @@ static int ipoib_path_open(struct inode *inode, struct file *file)
252 return 0; 252 return 0;
253} 253}
254 254
255static struct file_operations ipoib_path_fops = { 255static const struct file_operations ipoib_path_fops = {
256 .owner = THIS_MODULE, 256 .owner = THIS_MODULE,
257 .open = ipoib_path_open, 257 .open = ipoib_path_open,
258 .read = seq_read, 258 .read = seq_read,
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 7cf2b4f603a3..14d4c0493c36 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -482,7 +482,7 @@ static int input_proc_devices_open(struct inode *inode, struct file *file)
482 return seq_open(file, &input_devices_seq_ops); 482 return seq_open(file, &input_devices_seq_ops);
483} 483}
484 484
485static struct file_operations input_devices_fileops = { 485static const struct file_operations input_devices_fileops = {
486 .owner = THIS_MODULE, 486 .owner = THIS_MODULE,
487 .open = input_proc_devices_open, 487 .open = input_proc_devices_open,
488 .poll = input_proc_devices_poll, 488 .poll = input_proc_devices_poll,
@@ -533,7 +533,7 @@ static int input_proc_handlers_open(struct inode *inode, struct file *file)
533 return seq_open(file, &input_handlers_seq_ops); 533 return seq_open(file, &input_handlers_seq_ops);
534} 534}
535 535
536static struct file_operations input_handlers_fileops = { 536static const struct file_operations input_handlers_fileops = {
537 .owner = THIS_MODULE, 537 .owner = THIS_MODULE,
538 .open = input_proc_handlers_open, 538 .open = input_proc_handlers_open,
539 .read = seq_read, 539 .read = seq_read,
@@ -1142,7 +1142,7 @@ static int input_open_file(struct inode *inode, struct file *file)
1142 return err; 1142 return err;
1143} 1143}
1144 1144
1145static struct file_operations input_fops = { 1145static const struct file_operations input_fops = {
1146 .owner = THIS_MODULE, 1146 .owner = THIS_MODULE,
1147 .open = input_open_file, 1147 .open = input_open_file,
1148}; 1148};
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
index 31d5a13bfd6b..ab76ea442fa5 100644
--- a/drivers/input/misc/hp_sdc_rtc.c
+++ b/drivers/input/misc/hp_sdc_rtc.c
@@ -670,7 +670,7 @@ static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file,
670#endif 670#endif
671} 671}
672 672
673static struct file_operations hp_sdc_rtc_fops = { 673static const struct file_operations hp_sdc_rtc_fops = {
674 .owner = THIS_MODULE, 674 .owner = THIS_MODULE,
675 .llseek = no_llseek, 675 .llseek = no_llseek,
676 .read = hp_sdc_rtc_read, 676 .read = hp_sdc_rtc_read,
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 9516439b7c78..42556232c523 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -627,7 +627,7 @@ static long uinput_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
627 return retval; 627 return retval;
628} 628}
629 629
630static struct file_operations uinput_fops = { 630static const struct file_operations uinput_fops = {
631 .owner = THIS_MODULE, 631 .owner = THIS_MODULE,
632 .open = uinput_open, 632 .open = uinput_open,
633 .release = uinput_release, 633 .release = uinput_release,
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c
index 088ebc348ba3..887357666c68 100644
--- a/drivers/input/serio/serio_raw.c
+++ b/drivers/input/serio/serio_raw.c
@@ -234,7 +234,7 @@ static unsigned int serio_raw_poll(struct file *file, poll_table *wait)
234 return 0; 234 return 0;
235} 235}
236 236
237static struct file_operations serio_raw_fops = { 237static const struct file_operations serio_raw_fops = {
238 .owner = THIS_MODULE, 238 .owner = THIS_MODULE,
239 .open = serio_raw_open, 239 .open = serio_raw_open,
240 .release = serio_raw_release, 240 .release = serio_raw_release,
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 9e48bb5a3c09..db1260f73f10 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 ca9dc00a45c4..31f4fd8b8b0a 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 06967da7c4a8..53a189003355 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 77155d9f399b..6b2940ed0776 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 fff0d89c806b..556b19615bc7 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 91fc92c01afe..b365e44072c0 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 6a4373a4f1e8..0632a2606998 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 94a935089119..dc477e0aab0e 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 375d956884d7..f7e83a86f444 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 6a2ef0a87ed9..9c926e41b114 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,