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 4

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.

[akpm@sdl.org: dvb fix]
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
fa027c2a 2b8693c0

+78 -78
+1 -1
drivers/macintosh/adb.c
··· 885 885 return ret; 886 886 } 887 887 888 - static struct file_operations adb_fops = { 888 + static const struct file_operations adb_fops = { 889 889 .owner = THIS_MODULE, 890 890 .llseek = no_llseek, 891 891 .read = adb_read,
+1 -1
drivers/macintosh/ans-lcd.c
··· 121 121 return 0; 122 122 } 123 123 124 - struct file_operations anslcd_fops = { 124 + const struct file_operations anslcd_fops = { 125 125 .write = anslcd_write, 126 126 .ioctl = anslcd_ioctl, 127 127 .open = anslcd_open,
+1 -1
drivers/macintosh/apm_emu.c
··· 501 501 return p - buf; 502 502 } 503 503 504 - static struct file_operations apm_bios_fops = { 504 + static const struct file_operations apm_bios_fops = { 505 505 .owner = THIS_MODULE, 506 506 .read = do_read, 507 507 .poll = do_poll,
+1 -1
drivers/macintosh/nvram.c
··· 100 100 return 0; 101 101 } 102 102 103 - struct file_operations nvram_fops = { 103 + const struct file_operations nvram_fops = { 104 104 .owner = THIS_MODULE, 105 105 .llseek = nvram_llseek, 106 106 .read = read_nvram,
+1 -1
drivers/macintosh/smu.c
··· 1277 1277 } 1278 1278 1279 1279 1280 - static struct file_operations smu_device_fops = { 1280 + static const struct file_operations smu_device_fops = { 1281 1281 .llseek = no_llseek, 1282 1282 .read = smu_read, 1283 1283 .write = smu_write,
+1 -1
drivers/macintosh/via-pmu.c
··· 2672 2672 return error; 2673 2673 } 2674 2674 2675 - static struct file_operations pmu_device_fops = { 2675 + static const struct file_operations pmu_device_fops = { 2676 2676 .read = pmu_read, 2677 2677 .write = pmu_write, 2678 2678 .poll = pmu_fpoll,
+1 -1
drivers/macintosh/via-pmu68k.c
··· 1040 1040 return -EINVAL; 1041 1041 } 1042 1042 1043 - static struct file_operations pmu_device_fops = { 1043 + static const struct file_operations pmu_device_fops = { 1044 1044 .read = pmu_read, 1045 1045 .write = pmu_write, 1046 1046 .ioctl = pmu_ioctl,
+1 -1
drivers/md/dm-ioctl.c
··· 1473 1473 return r; 1474 1474 } 1475 1475 1476 - static struct file_operations _ctl_fops = { 1476 + static const struct file_operations _ctl_fops = { 1477 1477 .ioctl = ctl_ioctl, 1478 1478 .owner = THIS_MODULE, 1479 1479 };
+1 -1
drivers/md/md.c
··· 4920 4920 return mask; 4921 4921 } 4922 4922 4923 - static struct file_operations md_seq_fops = { 4923 + static const struct file_operations md_seq_fops = { 4924 4924 .owner = THIS_MODULE, 4925 4925 .open = md_seq_open, 4926 4926 .read = seq_read,
+1 -1
drivers/media/common/saa7146_fops.c
··· 416 416 } 417 417 } 418 418 419 - static struct file_operations video_fops = 419 + static const struct file_operations video_fops = 420 420 { 421 421 .owner = THIS_MODULE, 422 422 .open = fops_open,
+1 -1
drivers/media/radio/dsbr100.c
··· 144 144 145 145 146 146 /* File system interface */ 147 - static struct file_operations usb_dsbr100_fops = { 147 + static const struct file_operations usb_dsbr100_fops = { 148 148 .owner = THIS_MODULE, 149 149 .open = usb_dsbr100_open, 150 150 .release = usb_dsbr100_close,
+1 -1
drivers/media/radio/miropcm20-radio.c
··· 216 216 .muted = 1, 217 217 }; 218 218 219 - static struct file_operations pcm20_fops = { 219 + static const struct file_operations pcm20_fops = { 220 220 .owner = THIS_MODULE, 221 221 .open = video_exclusive_open, 222 222 .release = video_exclusive_release,
+1 -1
drivers/media/radio/miropcm20-rds.c
··· 105 105 } 106 106 } 107 107 108 - static struct file_operations rds_fops = { 108 + static const struct file_operations rds_fops = { 109 109 .owner = THIS_MODULE, 110 110 .read = rds_f_read, 111 111 .open = rds_f_open,
+1 -1
drivers/media/radio/radio-aimslab.c
··· 358 358 359 359 static struct rt_device rtrack_unit; 360 360 361 - static struct file_operations rtrack_fops = { 361 + static const struct file_operations rtrack_fops = { 362 362 .owner = THIS_MODULE, 363 363 .open = video_exclusive_open, 364 364 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-aztech.c
··· 314 314 315 315 static struct az_device aztech_unit; 316 316 317 - static struct file_operations aztech_fops = { 317 + static const struct file_operations aztech_fops = { 318 318 .owner = THIS_MODULE, 319 319 .open = video_exclusive_open, 320 320 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-cadet.c
··· 507 507 } 508 508 509 509 510 - static struct file_operations cadet_fops = { 510 + static const struct file_operations cadet_fops = { 511 511 .owner = THIS_MODULE, 512 512 .open = cadet_open, 513 513 .release = cadet_release,
+1 -1
drivers/media/radio/radio-gemtek-pci.c
··· 346 346 347 347 static int mx = 1; 348 348 349 - static struct file_operations gemtek_pci_fops = { 349 + static const struct file_operations gemtek_pci_fops = { 350 350 .owner = THIS_MODULE, 351 351 .open = video_exclusive_open, 352 352 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-gemtek.c
··· 296 296 297 297 static struct gemtek_device gemtek_unit; 298 298 299 - static struct file_operations gemtek_fops = { 299 + static const struct file_operations gemtek_fops = { 300 300 .owner = THIS_MODULE, 301 301 .open = video_exclusive_open, 302 302 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-maestro.c
··· 99 99 .remove = __devexit_p(maestro_remove), 100 100 }; 101 101 102 - static struct file_operations maestro_fops = { 102 + static const struct file_operations maestro_fops = { 103 103 .owner = THIS_MODULE, 104 104 .open = video_exclusive_open, 105 105 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-maxiradio.c
··· 91 91 static int radio_ioctl(struct inode *inode, struct file *file, 92 92 unsigned int cmd, unsigned long arg); 93 93 94 - static struct file_operations maxiradio_fops = { 94 + static const struct file_operations maxiradio_fops = { 95 95 .owner = THIS_MODULE, 96 96 .open = video_exclusive_open, 97 97 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-rtrack2.c
··· 262 262 263 263 static struct rt_device rtrack2_unit; 264 264 265 - static struct file_operations rtrack2_fops = { 265 + static const struct file_operations rtrack2_fops = { 266 266 .owner = THIS_MODULE, 267 267 .open = video_exclusive_open, 268 268 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-sf16fmi.c
··· 265 265 266 266 static struct fmi_device fmi_unit; 267 267 268 - static struct file_operations fmi_fops = { 268 + static const struct file_operations fmi_fops = { 269 269 .owner = THIS_MODULE, 270 270 .open = video_exclusive_open, 271 271 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-sf16fmr2.c
··· 410 410 411 411 static struct fmr2_device fmr2_unit; 412 412 413 - static struct file_operations fmr2_fops = { 413 + static const struct file_operations fmr2_fops = { 414 414 .owner = THIS_MODULE, 415 415 .open = video_exclusive_open, 416 416 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-terratec.c
··· 338 338 339 339 static struct tt_device terratec_unit; 340 340 341 - static struct file_operations terratec_fops = { 341 + static const struct file_operations terratec_fops = { 342 342 .owner = THIS_MODULE, 343 343 .open = video_exclusive_open, 344 344 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-trust.c
··· 325 325 return video_usercopy(inode, file, cmd, arg, tr_do_ioctl); 326 326 } 327 327 328 - static struct file_operations trust_fops = { 328 + static const struct file_operations trust_fops = { 329 329 .owner = THIS_MODULE, 330 330 .open = video_exclusive_open, 331 331 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-typhoon.c
··· 318 318 .mutefreq = CONFIG_RADIO_TYPHOON_MUTEFREQ, 319 319 }; 320 320 321 - static struct file_operations typhoon_fops = { 321 + static const struct file_operations typhoon_fops = { 322 322 .owner = THIS_MODULE, 323 323 .open = video_exclusive_open, 324 324 .release = video_exclusive_release,
+1 -1
drivers/media/radio/radio-zoltrix.c
··· 373 373 374 374 static struct zol_device zoltrix_unit; 375 375 376 - static struct file_operations zoltrix_fops = 376 + static const struct file_operations zoltrix_fops = 377 377 { 378 378 .owner = THIS_MODULE, 379 379 .open = video_exclusive_open,
+1 -1
drivers/media/video/arv.c
··· 742 742 * Video4Linux Module functions 743 743 * 744 744 ****************************************************************************/ 745 - static struct file_operations ar_fops = { 745 + static const struct file_operations ar_fops = { 746 746 .owner = THIS_MODULE, 747 747 .open = video_exclusive_open, 748 748 .release = video_exclusive_release,
+2 -2
drivers/media/video/bt8xx/bttv-driver.c
··· 3174 3174 return videobuf_mmap_mapper(bttv_queue(fh),vma); 3175 3175 } 3176 3176 3177 - static struct file_operations bttv_fops = 3177 + static const struct file_operations bttv_fops = 3178 3178 { 3179 3179 .owner = THIS_MODULE, 3180 3180 .open = bttv_open, ··· 3332 3332 return cmd.result; 3333 3333 } 3334 3334 3335 - static struct file_operations radio_fops = 3335 + static const struct file_operations radio_fops = 3336 3336 { 3337 3337 .owner = THIS_MODULE, 3338 3338 .open = radio_open,
+1 -1
drivers/media/video/bw-qcam.c
··· 871 871 return len; 872 872 } 873 873 874 - static struct file_operations qcam_fops = { 874 + static const struct file_operations qcam_fops = { 875 875 .owner = THIS_MODULE, 876 876 .open = video_exclusive_open, 877 877 .release = video_exclusive_release,
+1 -1
drivers/media/video/c-qcam.c
··· 684 684 } 685 685 686 686 /* video device template */ 687 - static struct file_operations qcam_fops = { 687 + static const struct file_operations qcam_fops = { 688 688 .owner = THIS_MODULE, 689 689 .open = video_exclusive_open, 690 690 .release = video_exclusive_release,
+3 -3
drivers/media/video/cafe_ccic.c
··· 1715 1715 * clone it for specific real devices. 1716 1716 */ 1717 1717 1718 - static struct file_operations cafe_v4l_fops = { 1718 + static const struct file_operations cafe_v4l_fops = { 1719 1719 .owner = THIS_MODULE, 1720 1720 .open = cafe_v4l_open, 1721 1721 .release = cafe_v4l_release, ··· 1969 1969 s - cafe_debug_buf); 1970 1970 } 1971 1971 1972 - static struct file_operations cafe_dfs_reg_ops = { 1972 + static const struct file_operations cafe_dfs_reg_ops = { 1973 1973 .owner = THIS_MODULE, 1974 1974 .read = cafe_dfs_read_regs, 1975 1975 .open = cafe_dfs_open ··· 1995 1995 s - cafe_debug_buf); 1996 1996 } 1997 1997 1998 - static struct file_operations cafe_dfs_cam_ops = { 1998 + static const struct file_operations cafe_dfs_cam_ops = { 1999 1999 .owner = THIS_MODULE, 2000 2000 .read = cafe_dfs_read_cam, 2001 2001 .open = cafe_dfs_open
+1 -1
drivers/media/video/cpia.c
··· 3791 3791 return 0; 3792 3792 } 3793 3793 3794 - static struct file_operations cpia_fops = { 3794 + static const struct file_operations cpia_fops = { 3795 3795 .owner = THIS_MODULE, 3796 3796 .open = cpia_open, 3797 3797 .release = cpia_close,
+1 -1
drivers/media/video/cpia2/cpia2_v4l.c
··· 1924 1924 /*** 1925 1925 * The v4l video device structure initialized for this device 1926 1926 ***/ 1927 - static struct file_operations fops_template = { 1927 + static const struct file_operations fops_template = { 1928 1928 .owner = THIS_MODULE, 1929 1929 .open = cpia2_open, 1930 1930 .release = cpia2_close,
+1 -1
drivers/media/video/cx88/cx88-blackbird.c
··· 1051 1051 return videobuf_mmap_mapper(&fh->mpegq, vma); 1052 1052 } 1053 1053 1054 - static struct file_operations mpeg_fops = 1054 + static const struct file_operations mpeg_fops = 1055 1055 { 1056 1056 .owner = THIS_MODULE, 1057 1057 .open = mpeg_open,
+2 -2
drivers/media/video/cx88/cx88-video.c
··· 1808 1808 /* ----------------------------------------------------------- */ 1809 1809 /* exported stuff */ 1810 1810 1811 - static struct file_operations video_fops = 1811 + static const struct file_operations video_fops = 1812 1812 { 1813 1813 .owner = THIS_MODULE, 1814 1814 .open = video_open, ··· 1839 1839 .minor = -1, 1840 1840 }; 1841 1841 1842 - static struct file_operations radio_fops = 1842 + static const struct file_operations radio_fops = 1843 1843 { 1844 1844 .owner = THIS_MODULE, 1845 1845 .open = video_open,
+1 -1
drivers/media/video/dabusb.c
··· 696 696 return ret; 697 697 } 698 698 699 - static struct file_operations dabusb_fops = 699 + static const struct file_operations dabusb_fops = 700 700 { 701 701 .owner = THIS_MODULE, 702 702 .llseek = no_llseek,
+1 -1
drivers/media/video/em28xx/em28xx-video.c
··· 1480 1480 return ret; 1481 1481 } 1482 1482 1483 - static struct file_operations em28xx_v4l_fops = { 1483 + static const struct file_operations em28xx_v4l_fops = { 1484 1484 .owner = THIS_MODULE, 1485 1485 .open = em28xx_v4l2_open, 1486 1486 .release = em28xx_v4l2_close,
+1 -1
drivers/media/video/et61x251/et61x251_core.c
··· 2454 2454 } 2455 2455 2456 2456 2457 - static struct file_operations et61x251_fops = { 2457 + static const struct file_operations et61x251_fops = { 2458 2458 .owner = THIS_MODULE, 2459 2459 .open = et61x251_open, 2460 2460 .release = et61x251_release,
+1 -1
drivers/media/video/meye.c
··· 1748 1748 return 0; 1749 1749 } 1750 1750 1751 - static struct file_operations meye_fops = { 1751 + static const struct file_operations meye_fops = { 1752 1752 .owner = THIS_MODULE, 1753 1753 .open = meye_open, 1754 1754 .release = meye_release,
+1 -1
drivers/media/video/ov511.c
··· 4653 4653 return 0; 4654 4654 } 4655 4655 4656 - static struct file_operations ov511_fops = { 4656 + static const struct file_operations ov511_fops = { 4657 4657 .owner = THIS_MODULE, 4658 4658 .open = ov51x_v4l1_open, 4659 4659 .release = ov51x_v4l1_close,
+1 -1
drivers/media/video/pms.c
··· 881 881 return len; 882 882 } 883 883 884 - static struct file_operations pms_fops = { 884 + static const struct file_operations pms_fops = { 885 885 .owner = THIS_MODULE, 886 886 .open = video_exclusive_open, 887 887 .release = video_exclusive_release,
+1 -1
drivers/media/video/pvrusb2/pvrusb2-v4l2.c
··· 986 986 } 987 987 988 988 989 - static struct file_operations vdev_fops = { 989 + static const struct file_operations vdev_fops = { 990 990 .owner = THIS_MODULE, 991 991 .open = pvr2_v4l2_open, 992 992 .release = pvr2_v4l2_release,
+1 -1
drivers/media/video/pwc/pwc-if.c
··· 152 152 unsigned int ioctlnr, unsigned long arg); 153 153 static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma); 154 154 155 - static struct file_operations pwc_fops = { 155 + static const struct file_operations pwc_fops = { 156 156 .owner = THIS_MODULE, 157 157 .open = pwc_video_open, 158 158 .release = pwc_video_close,
+1 -1
drivers/media/video/saa5246a.c
··· 817 817 module_init(init_saa_5246a); 818 818 module_exit(cleanup_saa_5246a); 819 819 820 - static struct file_operations saa_fops = { 820 + static const struct file_operations saa_fops = { 821 821 .owner = THIS_MODULE, 822 822 .open = saa5246a_open, 823 823 .release = saa5246a_release,
+1 -1
drivers/media/video/saa5249.c
··· 699 699 module_init(init_saa_5249); 700 700 module_exit(cleanup_saa_5249); 701 701 702 - static struct file_operations saa_fops = { 702 + static const struct file_operations saa_fops = { 703 703 .owner = THIS_MODULE, 704 704 .open = saa5249_open, 705 705 .release = saa5249_release,
+1 -1
drivers/media/video/saa7134/saa7134-empress.c
··· 319 319 return video_usercopy(inode, file, cmd, arg, ts_do_ioctl); 320 320 } 321 321 322 - static struct file_operations ts_fops = 322 + static const struct file_operations ts_fops = 323 323 { 324 324 .owner = THIS_MODULE, 325 325 .open = ts_open,
+2 -2
drivers/media/video/saa7134/saa7134-oss.c
··· 563 563 return mask; 564 564 } 565 565 566 - struct file_operations saa7134_dsp_fops = { 566 + const struct file_operations saa7134_dsp_fops = { 567 567 .owner = THIS_MODULE, 568 568 .open = dsp_open, 569 569 .release = dsp_release, ··· 804 804 } 805 805 } 806 806 807 - struct file_operations saa7134_mixer_fops = { 807 + const struct file_operations saa7134_mixer_fops = { 808 808 .owner = THIS_MODULE, 809 809 .open = mixer_open, 810 810 .release = mixer_release,
+2 -2
drivers/media/video/saa7134/saa7134-video.c
··· 2336 2336 return video_usercopy(inode, file, cmd, arg, radio_do_ioctl); 2337 2337 } 2338 2338 2339 - static struct file_operations video_fops = 2339 + static const struct file_operations video_fops = 2340 2340 { 2341 2341 .owner = THIS_MODULE, 2342 2342 .open = video_open, ··· 2349 2349 .llseek = no_llseek, 2350 2350 }; 2351 2351 2352 - static struct file_operations radio_fops = 2352 + static const struct file_operations radio_fops = 2353 2353 { 2354 2354 .owner = THIS_MODULE, 2355 2355 .open = video_open,
+2 -2
drivers/media/video/saa7134/saa7134.h
··· 683 683 /* ----------------------------------------------------------- */ 684 684 /* saa7134-oss.c */ 685 685 686 - extern struct file_operations saa7134_dsp_fops; 687 - extern struct file_operations saa7134_mixer_fops; 686 + extern const struct file_operations saa7134_dsp_fops; 687 + extern const struct file_operations saa7134_mixer_fops; 688 688 689 689 int saa7134_oss_init1(struct saa7134_dev *dev); 690 690 int saa7134_oss_fini(struct saa7134_dev *dev);
+1 -1
drivers/media/video/se401.c
··· 1185 1185 return 0; 1186 1186 } 1187 1187 1188 - static struct file_operations se401_fops = { 1188 + static const struct file_operations se401_fops = { 1189 1189 .owner = THIS_MODULE, 1190 1190 .open = se401_open, 1191 1191 .release = se401_close,
+1 -1
drivers/media/video/sn9c102/sn9c102_core.c
··· 2736 2736 2737 2737 /*****************************************************************************/ 2738 2738 2739 - static struct file_operations sn9c102_fops = { 2739 + static const struct file_operations sn9c102_fops = { 2740 2740 .owner = THIS_MODULE, 2741 2741 .open = sn9c102_open, 2742 2742 .release = sn9c102_release,
+1 -1
drivers/media/video/stradis.c
··· 1901 1901 return 0; 1902 1902 } 1903 1903 1904 - static struct file_operations saa_fops = { 1904 + static const struct file_operations saa_fops = { 1905 1905 .owner = THIS_MODULE, 1906 1906 .open = saa_open, 1907 1907 .release = saa_release,
+1 -1
drivers/media/video/stv680.c
··· 1380 1380 return realcount; 1381 1381 } /* stv680_read */ 1382 1382 1383 - static struct file_operations stv680_fops = { 1383 + static const struct file_operations stv680_fops = { 1384 1384 .owner = THIS_MODULE, 1385 1385 .open = stv_open, 1386 1386 .release = stv_close,
+1 -1
drivers/media/video/tvmixer.c
··· 228 228 .detach_client = tvmixer_clients, 229 229 }; 230 230 231 - static struct file_operations tvmixer_fops = { 231 + static const struct file_operations tvmixer_fops = { 232 232 .owner = THIS_MODULE, 233 233 .llseek = no_llseek, 234 234 .ioctl = tvmixer_ioctl,
+1 -1
drivers/media/video/usbvideo/usbvideo.c
··· 945 945 return rv; 946 946 } 947 947 948 - static struct file_operations usbvideo_fops = { 948 + static const struct file_operations usbvideo_fops = { 949 949 .owner = THIS_MODULE, 950 950 .open = usbvideo_v4l_open, 951 951 .release =usbvideo_v4l_close,
+1 -1
drivers/media/video/usbvideo/vicam.c
··· 1234 1234 static inline void vicam_destroy_proc_entry(void *ptr) { } 1235 1235 #endif 1236 1236 1237 - static struct file_operations vicam_fops = { 1237 + static const struct file_operations vicam_fops = { 1238 1238 .owner = THIS_MODULE, 1239 1239 .open = vicam_open, 1240 1240 .release = vicam_close,
+3 -3
drivers/media/video/usbvision/usbvision-video.c
··· 1475 1475 // 1476 1476 1477 1477 // Video template 1478 - static struct file_operations usbvision_fops = { 1478 + static const struct file_operations usbvision_fops = { 1479 1479 .owner = THIS_MODULE, 1480 1480 .open = usbvision_v4l2_open, 1481 1481 .release = usbvision_v4l2_close, ··· 1496 1496 1497 1497 1498 1498 // Radio template 1499 - static struct file_operations usbvision_radio_fops = { 1499 + static const struct file_operations usbvision_radio_fops = { 1500 1500 .owner = THIS_MODULE, 1501 1501 .open = usbvision_radio_open, 1502 1502 .release = usbvision_radio_close, ··· 1517 1517 1518 1518 1519 1519 // vbi template 1520 - static struct file_operations usbvision_vbi_fops = { 1520 + static const struct file_operations usbvision_vbi_fops = { 1521 1521 .owner = THIS_MODULE, 1522 1522 .open = usbvision_vbi_open, 1523 1523 .release = usbvision_vbi_close,
+2 -2
drivers/media/video/videodev.c
··· 1561 1561 } 1562 1562 1563 1563 1564 - static struct file_operations video_fops; 1564 + static const struct file_operations video_fops; 1565 1565 1566 1566 /** 1567 1567 * video_register_device - register video4linux devices ··· 1709 1709 /* 1710 1710 * Video fs operations 1711 1711 */ 1712 - static struct file_operations video_fops= 1712 + static const struct file_operations video_fops= 1713 1713 { 1714 1714 .owner = THIS_MODULE, 1715 1715 .llseek = no_llseek,
+1 -1
drivers/media/video/vino.c
··· 4390 4390 // __initdata 4391 4391 static int vino_init_stage = 0; 4392 4392 4393 - static struct file_operations vino_fops = { 4393 + static const struct file_operations vino_fops = { 4394 4394 .owner = THIS_MODULE, 4395 4395 .open = vino_open, 4396 4396 .release = vino_close,
+1 -1
drivers/media/video/vivi.c
··· 1292 1292 return ret; 1293 1293 } 1294 1294 1295 - static struct file_operations vivi_fops = { 1295 + static const struct file_operations vivi_fops = { 1296 1296 .owner = THIS_MODULE, 1297 1297 .open = vivi_open, 1298 1298 .release = vivi_release,
+1 -1
drivers/media/video/w9966.c
··· 183 183 static ssize_t w9966_v4l_read(struct file *file, char __user *buf, 184 184 size_t count, loff_t *ppos); 185 185 186 - static struct file_operations w9966_fops = { 186 + static const struct file_operations w9966_fops = { 187 187 .owner = THIS_MODULE, 188 188 .open = video_exclusive_open, 189 189 .release = video_exclusive_release,
+2 -2
drivers/media/video/w9968cf.c
··· 399 399 ****************************************************************************/ 400 400 401 401 /* Video4linux interface */ 402 - static struct file_operations w9968cf_fops; 402 + static const struct file_operations w9968cf_fops; 403 403 static int w9968cf_open(struct inode*, struct file*); 404 404 static int w9968cf_release(struct inode*, struct file*); 405 405 static int w9968cf_mmap(struct file*, struct vm_area_struct*); ··· 3466 3466 } 3467 3467 3468 3468 3469 - static struct file_operations w9968cf_fops = { 3469 + static const struct file_operations w9968cf_fops = { 3470 3470 .owner = THIS_MODULE, 3471 3471 .open = w9968cf_open, 3472 3472 .release = w9968cf_release,
+1 -1
drivers/media/video/zc0301/zc0301_core.c
··· 1871 1871 } 1872 1872 1873 1873 1874 - static struct file_operations zc0301_fops = { 1874 + static const struct file_operations zc0301_fops = { 1875 1875 .owner = THIS_MODULE, 1876 1876 .open = zc0301_open, 1877 1877 .release = zc0301_release,
+1 -1
drivers/media/video/zoran_driver.c
··· 4679 4679 return 0; 4680 4680 } 4681 4681 4682 - static struct file_operations zoran_fops = { 4682 + static const struct file_operations zoran_fops = { 4683 4683 .owner = THIS_MODULE, 4684 4684 .open = zoran_open, 4685 4685 .release = zoran_close,
+1 -1
drivers/media/video/zoran_procfs.c
··· 186 186 return count; 187 187 } 188 188 189 - static struct file_operations zoran_operations = { 189 + static const struct file_operations zoran_operations = { 190 190 .open = zoran_open, 191 191 .read = seq_read, 192 192 .write = zoran_write,
+1 -1
drivers/message/fusion/mptctl.c
··· 2662 2662 2663 2663 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 2664 2664 2665 - static struct file_operations mptctl_fops = { 2665 + static const struct file_operations mptctl_fops = { 2666 2666 .owner = THIS_MODULE, 2667 2667 .llseek = no_llseek, 2668 2668 .release = mptctl_release,