Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Arjan van de Ven and committed by
Linus Torvalds
2b8693c0 5dfe4c96

+83 -83
+1 -1
block/blktrace.c
··· 264 264 return simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf)); 265 265 } 266 266 267 - static struct file_operations blk_dropped_fops = { 267 + static const struct file_operations blk_dropped_fops = { 268 268 .owner = THIS_MODULE, 269 269 .open = blk_dropped_open, 270 270 .read = blk_dropped_read,
+1 -1
crypto/proc.c
··· 101 101 return seq_open(file, &crypto_seq_ops); 102 102 } 103 103 104 - static struct file_operations proc_crypto_ops = { 104 + static const struct file_operations proc_crypto_ops = { 105 105 .open = crypto_info_open, 106 106 .read = seq_read, 107 107 .llseek = seq_lseek,
+1 -1
drivers/acorn/char/i2c.c
··· 238 238 return -EINVAL; 239 239 } 240 240 241 - static struct file_operations rtc_fops = { 241 + static const struct file_operations rtc_fops = { 242 242 .ioctl = rtc_ioctl, 243 243 }; 244 244
+1 -1
drivers/block/DAC960.c
··· 7024 7024 return -EINVAL; 7025 7025 } 7026 7026 7027 - static struct file_operations DAC960_gam_fops = { 7027 + static const struct file_operations DAC960_gam_fops = { 7028 7028 .owner = THIS_MODULE, 7029 7029 .ioctl = DAC960_gam_ioctl 7030 7030 };
+1 -1
drivers/block/acsi_slm.c
··· 269 269 270 270 static DEFINE_TIMER(slm_timer, slm_test_ready, 0, 0); 271 271 272 - static struct file_operations slm_fops = { 272 + static const struct file_operations slm_fops = { 273 273 .owner = THIS_MODULE, 274 274 .read = slm_read, 275 275 .write = slm_write,
+1 -1
drivers/block/aoe/aoechr.c
··· 233 233 } 234 234 } 235 235 236 - static struct file_operations aoe_fops = { 236 + static const struct file_operations aoe_fops = { 237 237 .write = aoechr_write, 238 238 .read = aoechr_read, 239 239 .open = aoechr_open,
+1 -1
drivers/block/paride/pg.c
··· 227 227 228 228 /* kernel glue structures */ 229 229 230 - static struct file_operations pg_fops = { 230 + static const struct file_operations pg_fops = { 231 231 .owner = THIS_MODULE, 232 232 .read = pg_read, 233 233 .write = pg_write,
+1 -1
drivers/block/paride/pt.c
··· 232 232 233 233 /* kernel glue structures */ 234 234 235 - static struct file_operations pt_fops = { 235 + static const struct file_operations pt_fops = { 236 236 .owner = THIS_MODULE, 237 237 .read = pt_read, 238 238 .write = pt_write,
+3 -3
drivers/block/pktcdvd.c
··· 435 435 return single_open(file, pkt_debugfs_seq_show, inode->i_private); 436 436 } 437 437 438 - static struct file_operations debug_fops = { 438 + static const struct file_operations debug_fops = { 439 439 .open = pkt_debugfs_fops_open, 440 440 .read = seq_read, 441 441 .llseek = seq_lseek, ··· 2725 2725 return single_open(file, pkt_seq_show, PDE(inode)->data); 2726 2726 } 2727 2727 2728 - static struct file_operations pkt_proc_fops = { 2728 + static const struct file_operations pkt_proc_fops = { 2729 2729 .open = pkt_seq_open, 2730 2730 .read = seq_read, 2731 2731 .llseek = seq_lseek, ··· 3052 3052 } 3053 3053 3054 3054 3055 - static struct file_operations pkt_ctl_fops = { 3055 + static const struct file_operations pkt_ctl_fops = { 3056 3056 .ioctl = pkt_ctl_ioctl, 3057 3057 .owner = THIS_MODULE, 3058 3058 };
+1 -1
drivers/bluetooth/hci_vhci.c
··· 332 332 return 0; 333 333 } 334 334 335 - static struct file_operations vhci_fops = { 335 + static const struct file_operations vhci_fops = { 336 336 .owner = THIS_MODULE, 337 337 .llseek = vhci_llseek, 338 338 .read = vhci_read,
+1 -1
drivers/cdrom/viocd.c
··· 176 176 return single_open(file, proc_viocd_show, NULL); 177 177 } 178 178 179 - static struct file_operations proc_viocd_operations = { 179 + static const struct file_operations proc_viocd_operations = { 180 180 .open = proc_viocd_open, 181 181 .read = seq_read, 182 182 .llseek = seq_lseek,
+1 -1
drivers/char/briq_panel.c
··· 187 187 return len; 188 188 } 189 189 190 - static struct file_operations briq_panel_fops = { 190 + static const struct file_operations briq_panel_fops = { 191 191 .owner = THIS_MODULE, 192 192 .read = briq_panel_read, 193 193 .write = briq_panel_write,
+1 -1
drivers/char/drm/drm_drv.c
··· 371 371 EXPORT_SYMBOL(drm_exit); 372 372 373 373 /** File operations structure */ 374 - static struct file_operations drm_stub_fops = { 374 + static const struct file_operations drm_stub_fops = { 375 375 .owner = THIS_MODULE, 376 376 .open = drm_stub_open 377 377 };
+1 -1
drivers/char/drm/i810_dma.c
··· 112 112 return 0; 113 113 } 114 114 115 - static struct file_operations i810_buffer_fops = { 115 + static const struct file_operations i810_buffer_fops = { 116 116 .open = drm_open, 117 117 .release = drm_release, 118 118 .ioctl = drm_ioctl,
+1 -1
drivers/char/drm/i830_dma.c
··· 114 114 return 0; 115 115 } 116 116 117 - static struct file_operations i830_buffer_fops = { 117 + static const struct file_operations i830_buffer_fops = { 118 118 .open = drm_open, 119 119 .release = drm_release, 120 120 .ioctl = drm_ioctl,
+1 -1
drivers/char/generic_nvram.c
··· 117 117 return 0; 118 118 } 119 119 120 - struct file_operations nvram_fops = { 120 + const struct file_operations nvram_fops = { 121 121 .owner = THIS_MODULE, 122 122 .llseek = nvram_llseek, 123 123 .read = read_nvram,
+1 -1
drivers/char/mbcs.c
··· 46 46 /* 47 47 * file operations 48 48 */ 49 - struct file_operations mbcs_ops = { 49 + const struct file_operations mbcs_ops = { 50 50 .open = mbcs_open, 51 51 .llseek = mbcs_sram_llseek, 52 52 .read = mbcs_sram_read,
+3 -3
drivers/char/mspec.c
··· 291 291 return mspec_mmap(file, vma, MSPEC_UNCACHED); 292 292 } 293 293 294 - static struct file_operations fetchop_fops = { 294 + static const struct file_operations fetchop_fops = { 295 295 .owner = THIS_MODULE, 296 296 .mmap = fetchop_mmap 297 297 }; ··· 302 302 .fops = &fetchop_fops 303 303 }; 304 304 305 - static struct file_operations cached_fops = { 305 + static const struct file_operations cached_fops = { 306 306 .owner = THIS_MODULE, 307 307 .mmap = cached_mmap 308 308 }; ··· 313 313 .fops = &cached_fops 314 314 }; 315 315 316 - static struct file_operations uncached_fops = { 316 + static const struct file_operations uncached_fops = { 317 317 .owner = THIS_MODULE, 318 318 .mmap = uncached_mmap 319 319 };
+2 -2
drivers/char/random.c
··· 1117 1117 } 1118 1118 } 1119 1119 1120 - struct file_operations random_fops = { 1120 + const struct file_operations random_fops = { 1121 1121 .read = random_read, 1122 1122 .write = random_write, 1123 1123 .poll = random_poll, 1124 1124 .ioctl = random_ioctl, 1125 1125 }; 1126 1126 1127 - struct file_operations urandom_fops = { 1127 + const struct file_operations urandom_fops = { 1128 1128 .read = urandom_read, 1129 1129 .write = random_write, 1130 1130 .ioctl = random_ioctl,
+2 -2
drivers/char/tpm/tpm_bios.c
··· 441 441 return err; 442 442 } 443 443 444 - struct file_operations tpm_ascii_bios_measurements_ops = { 444 + const struct file_operations tpm_ascii_bios_measurements_ops = { 445 445 .open = tpm_ascii_bios_measurements_open, 446 446 .read = seq_read, 447 447 .llseek = seq_lseek, ··· 474 474 return err; 475 475 } 476 476 477 - struct file_operations tpm_binary_bios_measurements_ops = { 477 + const struct file_operations tpm_binary_bios_measurements_ops = { 478 478 .open = tpm_binary_bios_measurements_open, 479 479 .read = seq_read, 480 480 .llseek = seq_lseek,
+1 -1
drivers/char/viotape.c
··· 872 872 return ret; 873 873 } 874 874 875 - struct file_operations viotap_fops = { 875 + const struct file_operations viotap_fops = { 876 876 owner: THIS_MODULE, 877 877 read: viotap_read, 878 878 write: viotap_write,
+1 -1
drivers/char/watchdog/iTCO_wdt.c
··· 539 539 * Kernel Interfaces 540 540 */ 541 541 542 - static struct file_operations iTCO_wdt_fops = { 542 + static const struct file_operations iTCO_wdt_fops = { 543 543 .owner = THIS_MODULE, 544 544 .llseek = no_llseek, 545 545 .write = iTCO_wdt_write,
+1 -1
drivers/char/watchdog/omap_wdt.c
··· 230 230 } 231 231 } 232 232 233 - static struct file_operations omap_wdt_fops = { 233 + static const struct file_operations omap_wdt_fops = { 234 234 .owner = THIS_MODULE, 235 235 .write = omap_wdt_write, 236 236 .ioctl = omap_wdt_ioctl,
+1 -1
drivers/char/watchdog/pc87413_wdt.c
··· 526 526 527 527 /* -- Module's structures ---------------------------------------*/ 528 528 529 - static struct file_operations pc87413_fops = { 529 + static const struct file_operations pc87413_fops = { 530 530 .owner = THIS_MODULE, 531 531 .llseek = no_llseek, 532 532 .write = pc87413_write,
+1 -1
drivers/char/watchdog/pnx4008_wdt.c
··· 238 238 return 0; 239 239 } 240 240 241 - static struct file_operations pnx4008_wdt_fops = { 241 + static const struct file_operations pnx4008_wdt_fops = { 242 242 .owner = THIS_MODULE, 243 243 .llseek = no_llseek, 244 244 .write = pnx4008_wdt_write,
+1 -1
drivers/char/watchdog/rm9k_wdt.c
··· 95 95 96 96 97 97 /* Kernel interfaces */ 98 - static struct file_operations fops = { 98 + static const struct file_operations fops = { 99 99 .owner = THIS_MODULE, 100 100 .open = wdt_gpi_open, 101 101 .release = wdt_gpi_release,
+1 -1
drivers/char/watchdog/smsc37b787_wdt.c
··· 510 510 511 511 /* -- Module's structures ---------------------------------------*/ 512 512 513 - static struct file_operations wb_smsc_wdt_fops = 513 + static const struct file_operations wb_smsc_wdt_fops = 514 514 { 515 515 .owner = THIS_MODULE, 516 516 .llseek = no_llseek,
+1 -1
drivers/char/watchdog/w83697hf_wdt.c
··· 323 323 * Kernel Interfaces 324 324 */ 325 325 326 - static struct file_operations wdt_fops = { 326 + static const struct file_operations wdt_fops = { 327 327 .owner = THIS_MODULE, 328 328 .llseek = no_llseek, 329 329 .write = wdt_write,
+1 -1
drivers/i2c/chips/tps65010.c
··· 308 308 return single_open(file, dbg_show, inode->i_private); 309 309 } 310 310 311 - static struct file_operations debug_fops = { 311 + static const struct file_operations debug_fops = { 312 312 .open = dbg_tps_open, 313 313 .read = seq_read, 314 314 .llseek = seq_lseek,
+1 -1
drivers/i2c/i2c-dev.c
··· 392 392 return 0; 393 393 } 394 394 395 - static struct file_operations i2cdev_fops = { 395 + static const struct file_operations i2cdev_fops = { 396 396 .owner = THIS_MODULE, 397 397 .llseek = no_llseek, 398 398 .read = i2cdev_read,
+1 -1
drivers/ide/ide-proc.c
··· 548 548 return single_open(file, &ide_drivers_show, NULL); 549 549 } 550 550 551 - static struct file_operations ide_drivers_operations = { 551 + static const struct file_operations ide_drivers_operations = { 552 552 .open = ide_drivers_open, 553 553 .read = seq_read, 554 554 .llseek = seq_lseek,
+1 -1
drivers/ide/ide-tape.c
··· 4779 4779 /* 4780 4780 * Our character device supporting functions, passed to register_chrdev. 4781 4781 */ 4782 - static struct file_operations idetape_fops = { 4782 + static const struct file_operations idetape_fops = { 4783 4783 .owner = THIS_MODULE, 4784 4784 .read = idetape_chrdev_read, 4785 4785 .write = idetape_chrdev_write,
+1 -1
drivers/ieee1394/dv1394.c
··· 2147 2147 } 2148 2148 2149 2149 static struct cdev dv1394_cdev; 2150 - static struct file_operations dv1394_fops= 2150 + static const struct file_operations dv1394_fops= 2151 2151 { 2152 2152 .owner = THIS_MODULE, 2153 2153 .poll = dv1394_poll,
+1 -1
drivers/ieee1394/raw1394.c
··· 3013 3013 }; 3014 3014 3015 3015 static struct cdev raw1394_cdev; 3016 - static struct file_operations raw1394_fops = { 3016 + static const struct file_operations raw1394_fops = { 3017 3017 .owner = THIS_MODULE, 3018 3018 .read = raw1394_read, 3019 3019 .write = raw1394_write,
+1 -1
drivers/ieee1394/video1394.c
··· 1277 1277 #endif 1278 1278 1279 1279 static struct cdev video1394_cdev; 1280 - static struct file_operations video1394_fops= 1280 + static const struct file_operations video1394_fops= 1281 1281 { 1282 1282 .owner = THIS_MODULE, 1283 1283 .unlocked_ioctl = video1394_ioctl,
+1 -1
drivers/infiniband/core/ucm.c
··· 1221 1221 kfree(dev); 1222 1222 } 1223 1223 1224 - static struct file_operations ucm_fops = { 1224 + static const struct file_operations ucm_fops = { 1225 1225 .owner = THIS_MODULE, 1226 1226 .open = ib_ucm_open, 1227 1227 .release = ib_ucm_close,
+1 -1
drivers/infiniband/core/ucma.c
··· 833 833 return 0; 834 834 } 835 835 836 - static struct file_operations ucma_fops = { 836 + static const struct file_operations ucma_fops = { 837 837 .owner = THIS_MODULE, 838 838 .open = ucma_open, 839 839 .release = ucma_close,
+2 -2
drivers/infiniband/core/user_mad.c
··· 771 771 return 0; 772 772 } 773 773 774 - static struct file_operations umad_fops = { 774 + static const struct file_operations umad_fops = { 775 775 .owner = THIS_MODULE, 776 776 .read = ib_umad_read, 777 777 .write = ib_umad_write, ··· 846 846 return ret; 847 847 } 848 848 849 - static struct file_operations umad_sm_fops = { 849 + static const struct file_operations umad_sm_fops = { 850 850 .owner = THIS_MODULE, 851 851 .open = ib_umad_sm_open, 852 852 .release = ib_umad_sm_close
+3 -3
drivers/infiniband/core/uverbs_main.c
··· 375 375 return 0; 376 376 } 377 377 378 - static struct file_operations uverbs_event_fops = { 378 + static const struct file_operations uverbs_event_fops = { 379 379 .owner = THIS_MODULE, 380 380 .read = ib_uverbs_event_read, 381 381 .poll = ib_uverbs_event_poll, ··· 679 679 return 0; 680 680 } 681 681 682 - static struct file_operations uverbs_fops = { 682 + static const struct file_operations uverbs_fops = { 683 683 .owner = THIS_MODULE, 684 684 .write = ib_uverbs_write, 685 685 .open = ib_uverbs_open, 686 686 .release = ib_uverbs_close 687 687 }; 688 688 689 - static struct file_operations uverbs_mmap_fops = { 689 + static const struct file_operations uverbs_mmap_fops = { 690 690 .owner = THIS_MODULE, 691 691 .write = ib_uverbs_write, 692 692 .mmap = ib_uverbs_mmap,
+2 -2
drivers/infiniband/hw/ipath/ipath_diag.c
··· 59 59 static ssize_t ipath_diag_write(struct file *fp, const char __user *data, 60 60 size_t count, loff_t *off); 61 61 62 - static struct file_operations diag_file_ops = { 62 + static const struct file_operations diag_file_ops = { 63 63 .owner = THIS_MODULE, 64 64 .write = ipath_diag_write, 65 65 .read = ipath_diag_read, ··· 71 71 const char __user *data, 72 72 size_t count, loff_t *off); 73 73 74 - static struct file_operations diagpkt_file_ops = { 74 + static const struct file_operations diagpkt_file_ops = { 75 75 .owner = THIS_MODULE, 76 76 .write = ipath_diagpkt_write, 77 77 };
+3 -3
drivers/infiniband/hw/ipath/ipath_file_ops.c
··· 54 54 static unsigned int ipath_poll(struct file *, struct poll_table_struct *); 55 55 static int ipath_mmap(struct file *, struct vm_area_struct *); 56 56 57 - static struct file_operations ipath_file_ops = { 57 + static const struct file_operations ipath_file_ops = { 58 58 .owner = THIS_MODULE, 59 59 .write = ipath_write, 60 60 .open = ipath_open, ··· 2153 2153 2154 2154 static struct class *ipath_class; 2155 2155 2156 - static int init_cdev(int minor, char *name, struct file_operations *fops, 2156 + static int init_cdev(int minor, char *name, const struct file_operations *fops, 2157 2157 struct cdev **cdevp, struct class_device **class_devp) 2158 2158 { 2159 2159 const dev_t dev = MKDEV(IPATH_MAJOR, minor); ··· 2210 2210 return ret; 2211 2211 } 2212 2212 2213 - int ipath_cdev_init(int minor, char *name, struct file_operations *fops, 2213 + int ipath_cdev_init(int minor, char *name, const struct file_operations *fops, 2214 2214 struct cdev **cdevp, struct class_device **class_devp) 2215 2215 { 2216 2216 return init_cdev(minor, name, fops, cdevp, class_devp);
+7 -7
drivers/infiniband/hw/ipath/ipath_fs.c
··· 47 47 static struct super_block *ipath_super; 48 48 49 49 static 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 51 void *data) 52 52 { 53 53 int error; ··· 81 81 82 82 static int create_file(const char *name, mode_t mode, 83 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 86 int error; 87 87 ··· 105 105 sizeof ipath_stats); 106 106 } 107 107 108 - static struct file_operations atomic_stats_ops = { 108 + static const struct file_operations atomic_stats_ops = { 109 109 .read = atomic_stats_read, 110 110 }; 111 111 ··· 127 127 sizeof counters); 128 128 } 129 129 130 - static struct file_operations atomic_counters_ops = { 130 + static const struct file_operations atomic_counters_ops = { 131 131 .read = atomic_counters_read, 132 132 }; 133 133 ··· 166 166 sizeof nodeinfo); 167 167 } 168 168 169 - static struct file_operations atomic_node_info_ops = { 169 + static const struct file_operations atomic_node_info_ops = { 170 170 .read = atomic_node_info_read, 171 171 }; 172 172 ··· 291 291 sizeof portinfo); 292 292 } 293 293 294 - static struct file_operations atomic_port_info_ops = { 294 + static const struct file_operations atomic_port_info_ops = { 295 295 .read = atomic_port_info_read, 296 296 }; 297 297 ··· 394 394 return ret; 395 395 } 396 396 397 - static struct file_operations flash_ops = { 397 + static const struct file_operations flash_ops = { 398 398 .read = flash_read, 399 399 .write = flash_write, 400 400 };
+1 -1
drivers/infiniband/hw/ipath/ipath_kernel.h
··· 593 593 void ipath_disarm_senderrbufs(struct ipath_devdata *); 594 594 595 595 struct file_operations; 596 - int ipath_cdev_init(int minor, char *name, struct file_operations *fops, 596 + int ipath_cdev_init(int minor, char *name, const struct file_operations *fops, 597 597 struct cdev **cdevp, struct class_device **class_devp); 598 598 void ipath_cdev_cleanup(struct cdev **cdevp, 599 599 struct class_device **class_devp);
+2 -2
drivers/infiniband/ulp/ipoib/ipoib_fs.c
··· 146 146 return 0; 147 147 } 148 148 149 - static struct file_operations ipoib_mcg_fops = { 149 + static const struct file_operations ipoib_mcg_fops = { 150 150 .owner = THIS_MODULE, 151 151 .open = ipoib_mcg_open, 152 152 .read = seq_read, ··· 252 252 return 0; 253 253 } 254 254 255 - static struct file_operations ipoib_path_fops = { 255 + static const struct file_operations ipoib_path_fops = { 256 256 .owner = THIS_MODULE, 257 257 .open = ipoib_path_open, 258 258 .read = seq_read,
+3 -3
drivers/input/input.c
··· 482 482 return seq_open(file, &input_devices_seq_ops); 483 483 } 484 484 485 - static struct file_operations input_devices_fileops = { 485 + static const struct file_operations input_devices_fileops = { 486 486 .owner = THIS_MODULE, 487 487 .open = input_proc_devices_open, 488 488 .poll = input_proc_devices_poll, ··· 533 533 return seq_open(file, &input_handlers_seq_ops); 534 534 } 535 535 536 - static struct file_operations input_handlers_fileops = { 536 + static const struct file_operations input_handlers_fileops = { 537 537 .owner = THIS_MODULE, 538 538 .open = input_proc_handlers_open, 539 539 .read = seq_read, ··· 1142 1142 return err; 1143 1143 } 1144 1144 1145 - static struct file_operations input_fops = { 1145 + static const struct file_operations input_fops = { 1146 1146 .owner = THIS_MODULE, 1147 1147 .open = input_open_file, 1148 1148 };
+1 -1
drivers/input/misc/hp_sdc_rtc.c
··· 670 670 #endif 671 671 } 672 672 673 - static struct file_operations hp_sdc_rtc_fops = { 673 + static const struct file_operations hp_sdc_rtc_fops = { 674 674 .owner = THIS_MODULE, 675 675 .llseek = no_llseek, 676 676 .read = hp_sdc_rtc_read,
+1 -1
drivers/input/misc/uinput.c
··· 627 627 return retval; 628 628 } 629 629 630 - static struct file_operations uinput_fops = { 630 + static const struct file_operations uinput_fops = { 631 631 .owner = THIS_MODULE, 632 632 .open = uinput_open, 633 633 .release = uinput_release,
+1 -1
drivers/input/serio/serio_raw.c
··· 234 234 return 0; 235 235 } 236 236 237 - static struct file_operations serio_raw_fops = { 237 + static const struct file_operations serio_raw_fops = { 238 238 .owner = THIS_MODULE, 239 239 .open = serio_raw_open, 240 240 .release = serio_raw_release,
+1 -1
drivers/isdn/capi/capi.c
··· 1003 1003 return 0; 1004 1004 } 1005 1005 1006 - static struct file_operations capi_fops = 1006 + static const struct file_operations capi_fops = 1007 1007 { 1008 1008 .owner = THIS_MODULE, 1009 1009 .llseek = no_llseek,
+5 -5
drivers/isdn/capi/kcapi_proc.c
··· 113 113 return seq_open(file, &seq_contrstats_ops); 114 114 } 115 115 116 - static struct file_operations proc_controller_ops = { 116 + static const struct file_operations proc_controller_ops = { 117 117 .open = seq_controller_open, 118 118 .read = seq_read, 119 119 .llseek = seq_lseek, 120 120 .release = seq_release, 121 121 }; 122 122 123 - static struct file_operations proc_contrstats_ops = { 123 + static const struct file_operations proc_contrstats_ops = { 124 124 .open = seq_contrstats_open, 125 125 .read = seq_read, 126 126 .llseek = seq_lseek, ··· 218 218 return seq_open(file, &seq_applstats_ops); 219 219 } 220 220 221 - static struct file_operations proc_applications_ops = { 221 + static const struct file_operations proc_applications_ops = { 222 222 .open = seq_applications_open, 223 223 .read = seq_read, 224 224 .llseek = seq_lseek, 225 225 .release = seq_release, 226 226 }; 227 227 228 - static struct file_operations proc_applstats_ops = { 228 + static const struct file_operations proc_applstats_ops = { 229 229 .open = seq_applstats_open, 230 230 .read = seq_read, 231 231 .llseek = seq_lseek, ··· 302 302 return err; 303 303 } 304 304 305 - static struct file_operations proc_driver_ops = { 305 + static const struct file_operations proc_driver_ops = { 306 306 .open = seq_capi_driver_open, 307 307 .read = seq_read, 308 308 .llseek = seq_lseek,
+1 -1
drivers/isdn/divert/divert_procfs.c
··· 256 256 257 257 258 258 #ifdef CONFIG_PROC_FS 259 - static struct file_operations isdn_fops = 259 + static const struct file_operations isdn_fops = 260 260 { 261 261 .owner = THIS_MODULE, 262 262 .llseek = no_llseek,
+1 -1
drivers/isdn/hardware/eicon/divamnt.c
··· 164 164 return (maint_read_write(buf, (int) count)); 165 165 } 166 166 167 - static struct file_operations divas_maint_fops = { 167 + static const struct file_operations divas_maint_fops = { 168 168 .owner = THIS_MODULE, 169 169 .llseek = no_llseek, 170 170 .read = divas_maint_read,
+1 -1
drivers/isdn/hardware/eicon/divasi.c
··· 131 131 } 132 132 } 133 133 134 - static struct file_operations divas_idi_fops = { 134 + static const struct file_operations divas_idi_fops = { 135 135 .owner = THIS_MODULE, 136 136 .llseek = no_llseek, 137 137 .read = um_idi_read,
+1 -1
drivers/isdn/hardware/eicon/divasmain.c
··· 663 663 return (POLLIN | POLLRDNORM); 664 664 } 665 665 666 - static struct file_operations divas_fops = { 666 + static const struct file_operations divas_fops = { 667 667 .owner = THIS_MODULE, 668 668 .llseek = no_llseek, 669 669 .read = divas_read,
+1 -1
drivers/isdn/hardware/eicon/divasproc.c
··· 113 113 return (0); 114 114 } 115 115 116 - static struct file_operations divas_fops = { 116 + static const struct file_operations divas_fops = { 117 117 .owner = THIS_MODULE, 118 118 .llseek = no_llseek, 119 119 .read = divas_read,
+1 -1
drivers/isdn/hysdn/hysdn_procconf.c
··· 367 367 /******************************************************/ 368 368 /* table for conf filesystem functions defined above. */ 369 369 /******************************************************/ 370 - static struct file_operations conf_fops = 370 + static const struct file_operations conf_fops = 371 371 { 372 372 .llseek = no_llseek, 373 373 .read = hysdn_conf_read,
+1 -1
drivers/isdn/hysdn/hysdn_proclog.c
··· 383 383 /**************************************************/ 384 384 /* table for log filesystem functions defined above. */ 385 385 /**************************************************/ 386 - static struct file_operations log_fops = 386 + static const struct file_operations log_fops = 387 387 { 388 388 .llseek = no_llseek, 389 389 .read = hysdn_log_read,
+1 -1
drivers/isdn/i4l/isdn_common.c
··· 1822 1822 return 0; 1823 1823 } 1824 1824 1825 - static struct file_operations isdn_fops = 1825 + static const struct file_operations isdn_fops = 1826 1826 { 1827 1827 .owner = THIS_MODULE, 1828 1828 .llseek = no_llseek,