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

[PATCH] make more file_operation structs static

Mark the static struct file_operations in drivers/char as const. Making
them const prevents accidental bugs, and moves them to the .rodata section
so that they no longer do any false sharing; in addition with the proper
debug option they are then protected against corruption..

[akpm@osdl.org: build fix]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Arjan van de Ven and committed by
Linus Torvalds
62322d25 d459ec0b

+118 -118
+1 -1
drivers/char/agp/frontend.c
··· 1059 1059 return ret_val; 1060 1060 } 1061 1061 1062 - static struct file_operations agp_fops = 1062 + static const struct file_operations agp_fops = 1063 1063 { 1064 1064 .owner = THIS_MODULE, 1065 1065 .llseek = no_llseek,
+1 -1
drivers/char/applicom.c
··· 112 112 unsigned long); 113 113 static irqreturn_t ac_interrupt(int, void *, struct pt_regs *); 114 114 115 - static struct file_operations ac_fops = { 115 + static const struct file_operations ac_fops = { 116 116 .owner = THIS_MODULE, 117 117 .llseek = no_llseek, 118 118 .read = ac_read,
+1 -1
drivers/char/cs5535_gpio.c
··· 158 158 return nonseekable_open(inode, file); 159 159 } 160 160 161 - static struct file_operations cs5535_gpio_fops = { 161 + static const struct file_operations cs5535_gpio_fops = { 162 162 .owner = THIS_MODULE, 163 163 .write = cs5535_gpio_write, 164 164 .read = cs5535_gpio_read,
+1 -1
drivers/char/ds1286.c
··· 281 281 * The various file operations we support. 282 282 */ 283 283 284 - static struct file_operations ds1286_fops = { 284 + static const struct file_operations ds1286_fops = { 285 285 .llseek = no_llseek, 286 286 .read = ds1286_read, 287 287 .poll = ds1286_poll,
+1 -1
drivers/char/ds1302.c
··· 282 282 283 283 /* The various file operations we support. */ 284 284 285 - static struct file_operations rtc_fops = { 285 + static const struct file_operations rtc_fops = { 286 286 .owner = THIS_MODULE, 287 287 .ioctl = rtc_ioctl, 288 288 };
+1 -1
drivers/char/ds1620.c
··· 336 336 static struct proc_dir_entry *proc_therm_ds1620; 337 337 #endif 338 338 339 - static struct file_operations ds1620_fops = { 339 + static const struct file_operations ds1620_fops = { 340 340 .owner = THIS_MODULE, 341 341 .open = nonseekable_open, 342 342 .read = ds1620_read,
+1 -1
drivers/char/dsp56k.c
··· 483 483 return 0; 484 484 } 485 485 486 - static struct file_operations dsp56k_fops = { 486 + static const struct file_operations dsp56k_fops = { 487 487 .owner = THIS_MODULE, 488 488 .read = dsp56k_read, 489 489 .write = dsp56k_write,
+1 -1
drivers/char/dtlk.c
··· 94 94 static int dtlk_ioctl(struct inode *inode, struct file *file, 95 95 unsigned int cmd, unsigned long arg); 96 96 97 - static struct file_operations dtlk_fops = 97 + static const struct file_operations dtlk_fops = 98 98 { 99 99 .owner = THIS_MODULE, 100 100 .read = dtlk_read,
+1 -1
drivers/char/efirtc.c
··· 285 285 * The various file operations we support. 286 286 */ 287 287 288 - static struct file_operations efi_rtc_fops = { 288 + static const struct file_operations efi_rtc_fops = { 289 289 .owner = THIS_MODULE, 290 290 .ioctl = efi_rtc_ioctl, 291 291 .open = efi_rtc_open,
+1 -1
drivers/char/ftape/zftape/zftape-init.c
··· 86 86 static ssize_t zft_write(struct file *fp, const char __user *buff, 87 87 size_t req_len, loff_t *ppos); 88 88 89 - static struct file_operations zft_cdev = 89 + static const struct file_operations zft_cdev = 90 90 { 91 91 .owner = THIS_MODULE, 92 92 .read = zft_read,
+1 -1
drivers/char/genrtc.c
··· 482 482 * The various file operations we support. 483 483 */ 484 484 485 - static struct file_operations gen_rtc_fops = { 485 + static const struct file_operations gen_rtc_fops = { 486 486 .owner = THIS_MODULE, 487 487 #ifdef CONFIG_GEN_RTC_X 488 488 .read = gen_rtc_read,
+1 -1
drivers/char/hpet.c
··· 553 553 return err; 554 554 } 555 555 556 - static struct file_operations hpet_fops = { 556 + static const struct file_operations hpet_fops = { 557 557 .owner = THIS_MODULE, 558 558 .llseek = no_llseek, 559 559 .read = hpet_read,
+1 -1
drivers/char/hw_random/core.c
··· 149 149 } 150 150 151 151 152 - static struct file_operations rng_chrdev_ops = { 152 + static const struct file_operations rng_chrdev_ops = { 153 153 .owner = THIS_MODULE, 154 154 .open = rng_dev_open, 155 155 .read = rng_dev_read,
+1 -1
drivers/char/i8k.c
··· 80 80 static int i8k_ioctl(struct inode *, struct file *, unsigned int, 81 81 unsigned long); 82 82 83 - static struct file_operations i8k_fops = { 83 + static const struct file_operations i8k_fops = { 84 84 .open = i8k_open_fs, 85 85 .read = seq_read, 86 86 .llseek = seq_lseek,
+1 -1
drivers/char/ip2/ip2main.c
··· 233 233 /* This is the driver descriptor for the ip2ipl device, which is used to 234 234 * download the loadware to the boards. 235 235 */ 236 - static struct file_operations ip2_ipl = { 236 + static const struct file_operations ip2_ipl = { 237 237 .owner = THIS_MODULE, 238 238 .read = ip2_ipl_read, 239 239 .write = ip2_ipl_write,
+1 -1
drivers/char/ip27-rtc.c
··· 196 196 * The various file operations we support. 197 197 */ 198 198 199 - static struct file_operations rtc_fops = { 199 + static const struct file_operations rtc_fops = { 200 200 .owner = THIS_MODULE, 201 201 .ioctl = rtc_ioctl, 202 202 .open = rtc_open,
+1 -1
drivers/char/ipmi/ipmi_devintf.c
··· 765 765 } 766 766 #endif 767 767 768 - static struct file_operations ipmi_fops = { 768 + static const struct file_operations ipmi_fops = { 769 769 .owner = THIS_MODULE, 770 770 .ioctl = ipmi_ioctl, 771 771 #ifdef CONFIG_COMPAT
+1 -1
drivers/char/ipmi/ipmi_watchdog.c
··· 807 807 return 0; 808 808 } 809 809 810 - static struct file_operations ipmi_wdog_fops = { 810 + static const struct file_operations ipmi_wdog_fops = { 811 811 .owner = THIS_MODULE, 812 812 .read = ipmi_read, 813 813 .poll = ipmi_poll,
+1 -1
drivers/char/istallion.c
··· 748 748 * will give access to the shared memory on the Stallion intelligent 749 749 * board. This is also a very useful debugging tool. 750 750 */ 751 - static struct file_operations stli_fsiomem = { 751 + static const struct file_operations stli_fsiomem = { 752 752 .owner = THIS_MODULE, 753 753 .read = stli_memread, 754 754 .write = stli_memwrite,
+1 -1
drivers/char/ite_gpio.c
··· 357 357 } 358 358 } 359 359 360 - static struct file_operations ite_gpio_fops = { 360 + static const struct file_operations ite_gpio_fops = { 361 361 .owner = THIS_MODULE, 362 362 .ioctl = ite_gpio_ioctl, 363 363 .open = ite_gpio_open,
+1 -1
drivers/char/lcd.c
··· 598 598 * The various file operations we support. 599 599 */ 600 600 601 - static struct file_operations lcd_fops = { 601 + static const struct file_operations lcd_fops = { 602 602 .read = lcd_read, 603 603 .ioctl = lcd_ioctl, 604 604 .open = lcd_open,
+1 -1
drivers/char/lp.c
··· 666 666 return retval; 667 667 } 668 668 669 - static struct file_operations lp_fops = { 669 + static const struct file_operations lp_fops = { 670 670 .owner = THIS_MODULE, 671 671 .write = lp_write, 672 672 .ioctl = lp_ioctl,
+9 -9
drivers/char/mem.c
··· 776 776 #define open_kmem open_mem 777 777 #define open_oldmem open_mem 778 778 779 - static struct file_operations mem_fops = { 779 + static const struct file_operations mem_fops = { 780 780 .llseek = memory_lseek, 781 781 .read = read_mem, 782 782 .write = write_mem, ··· 784 784 .open = open_mem, 785 785 }; 786 786 787 - static struct file_operations kmem_fops = { 787 + static const struct file_operations kmem_fops = { 788 788 .llseek = memory_lseek, 789 789 .read = read_kmem, 790 790 .write = write_kmem, ··· 792 792 .open = open_kmem, 793 793 }; 794 794 795 - static struct file_operations null_fops = { 795 + static const struct file_operations null_fops = { 796 796 .llseek = null_lseek, 797 797 .read = read_null, 798 798 .write = write_null, ··· 800 800 }; 801 801 802 802 #if defined(CONFIG_ISA) || !defined(__mc68000__) 803 - static struct file_operations port_fops = { 803 + static const struct file_operations port_fops = { 804 804 .llseek = memory_lseek, 805 805 .read = read_port, 806 806 .write = write_port, ··· 808 808 }; 809 809 #endif 810 810 811 - static struct file_operations zero_fops = { 811 + static const struct file_operations zero_fops = { 812 812 .llseek = zero_lseek, 813 813 .read = read_zero, 814 814 .write = write_zero, ··· 819 819 .capabilities = BDI_CAP_MAP_COPY, 820 820 }; 821 821 822 - static struct file_operations full_fops = { 822 + static const struct file_operations full_fops = { 823 823 .llseek = full_lseek, 824 824 .read = read_full, 825 825 .write = write_full, 826 826 }; 827 827 828 828 #ifdef CONFIG_CRASH_DUMP 829 - static struct file_operations oldmem_fops = { 829 + static const struct file_operations oldmem_fops = { 830 830 .read = read_oldmem, 831 831 .open = open_oldmem, 832 832 }; ··· 853 853 return ret; 854 854 } 855 855 856 - static struct file_operations kmsg_fops = { 856 + static const struct file_operations kmsg_fops = { 857 857 .write = kmsg_write, 858 858 }; 859 859 ··· 903 903 return 0; 904 904 } 905 905 906 - static struct file_operations memory_fops = { 906 + static const struct file_operations memory_fops = { 907 907 .open = memory_open, /* just a selector for the real open */ 908 908 }; 909 909
+2 -2
drivers/char/misc.c
··· 113 113 return seq_open(file, &misc_seq_ops); 114 114 } 115 115 116 - static struct file_operations misc_proc_fops = { 116 + static const struct file_operations misc_proc_fops = { 117 117 .owner = THIS_MODULE, 118 118 .open = misc_seq_open, 119 119 .read = seq_read, ··· 176 176 */ 177 177 static struct class *misc_class; 178 178 179 - static struct file_operations misc_fops = { 179 + static const struct file_operations misc_fops = { 180 180 .owner = THIS_MODULE, 181 181 .open = misc_open, 182 182 };
+1 -1
drivers/char/mmtimer.c
··· 63 63 */ 64 64 static unsigned long mmtimer_femtoperiod = 0; 65 65 66 - static struct file_operations mmtimer_fops = { 66 + static const struct file_operations mmtimer_fops = { 67 67 .owner = THIS_MODULE, 68 68 .mmap = mmtimer_mmap, 69 69 .ioctl = mmtimer_ioctl,
+1 -1
drivers/char/mwave/mwavedd.c
··· 454 454 } 455 455 456 456 457 - static struct file_operations mwave_fops = { 457 + static const struct file_operations mwave_fops = { 458 458 .owner = THIS_MODULE, 459 459 .read = mwave_read, 460 460 .write = mwave_write,
+1 -1
drivers/char/nvram.c
··· 437 437 438 438 #endif /* CONFIG_PROC_FS */ 439 439 440 - static struct file_operations nvram_fops = { 440 + static const struct file_operations nvram_fops = { 441 441 .owner = THIS_MODULE, 442 442 .llseek = nvram_llseek, 443 443 .read = nvram_read,
+1 -1
drivers/char/nwbutton.c
··· 183 183 * attempts to perform these operations on the device. 184 184 */ 185 185 186 - static struct file_operations button_fops = { 186 + static const struct file_operations button_fops = { 187 187 .owner = THIS_MODULE, 188 188 .read = button_read, 189 189 };
+1 -1
drivers/char/nwflash.c
··· 642 642 udelay(25); 643 643 } 644 644 645 - static struct file_operations flash_fops = 645 + static const struct file_operations flash_fops = 646 646 { 647 647 .owner = THIS_MODULE, 648 648 .llseek = flash_llseek,
+1 -1
drivers/char/pc8736x_gpio.c
··· 236 236 return nonseekable_open(inode, file); 237 237 } 238 238 239 - static struct file_operations pc8736x_gpio_fops = { 239 + static const struct file_operations pc8736x_gpio_fops = { 240 240 .owner = THIS_MODULE, 241 241 .open = pc8736x_gpio_open, 242 242 .write = nsc_gpio_write,
+1 -1
drivers/char/pcmcia/cm4000_cs.c
··· 1938 1938 return; 1939 1939 } 1940 1940 1941 - static struct file_operations cm4000_fops = { 1941 + static const struct file_operations cm4000_fops = { 1942 1942 .owner = THIS_MODULE, 1943 1943 .read = cmm_read, 1944 1944 .write = cmm_write,
+1 -1
drivers/char/pcmcia/cm4040_cs.c
··· 688 688 return; 689 689 } 690 690 691 - static struct file_operations reader_fops = { 691 + static const struct file_operations reader_fops = { 692 692 .owner = THIS_MODULE, 693 693 .read = cm4040_read, 694 694 .write = cm4040_write,
+1 -1
drivers/char/ppdev.c
··· 739 739 740 740 static struct class *ppdev_class; 741 741 742 - static struct file_operations pp_fops = { 742 + static const struct file_operations pp_fops = { 743 743 .owner = THIS_MODULE, 744 744 .llseek = no_llseek, 745 745 .read = pp_read,
+3 -3
drivers/char/raw.c
··· 30 30 static struct class *raw_class; 31 31 static struct raw_device_data raw_devices[MAX_RAW_MINORS]; 32 32 static DEFINE_MUTEX(raw_mutex); 33 - static struct file_operations raw_ctl_fops; /* forward declaration */ 33 + static const struct file_operations raw_ctl_fops; /* forward declaration */ 34 34 35 35 /* 36 36 * Open/close code for raw IO. ··· 261 261 } 262 262 263 263 264 - static struct file_operations raw_fops = { 264 + static const struct file_operations raw_fops = { 265 265 .read = generic_file_read, 266 266 .aio_read = generic_file_aio_read, 267 267 .write = raw_file_write, ··· 274 274 .owner = THIS_MODULE, 275 275 }; 276 276 277 - static struct file_operations raw_ctl_fops = { 277 + static const struct file_operations raw_ctl_fops = { 278 278 .ioctl = raw_ctl_ioctl, 279 279 .open = raw_open, 280 280 .owner = THIS_MODULE,
+1 -1
drivers/char/rio/rio_linux.c
··· 243 243 * 244 244 */ 245 245 246 - static struct file_operations rio_fw_fops = { 246 + static const struct file_operations rio_fw_fops = { 247 247 .owner = THIS_MODULE, 248 248 .ioctl = rio_fw_ioctl, 249 249 };
+2 -2
drivers/char/rtc.c
··· 877 877 * The various file operations we support. 878 878 */ 879 879 880 - static struct file_operations rtc_fops = { 880 + static const struct file_operations rtc_fops = { 881 881 .owner = THIS_MODULE, 882 882 .llseek = no_llseek, 883 883 .read = rtc_read, ··· 896 896 .fops = &rtc_fops, 897 897 }; 898 898 899 - static struct file_operations rtc_proc_fops = { 899 + static const struct file_operations rtc_proc_fops = { 900 900 .owner = THIS_MODULE, 901 901 .open = rtc_proc_open, 902 902 .read = seq_read,
+1 -1
drivers/char/scx200_gpio.c
··· 63 63 } 64 64 65 65 66 - static struct file_operations scx200_gpio_fops = { 66 + static const struct file_operations scx200_gpio_fops = { 67 67 .owner = THIS_MODULE, 68 68 .write = nsc_gpio_write, 69 69 .read = nsc_gpio_read,
+1 -1
drivers/char/snsc.c
··· 347 347 return mask; 348 348 } 349 349 350 - static struct file_operations scdrv_fops = { 350 + static const struct file_operations scdrv_fops = { 351 351 .owner = THIS_MODULE, 352 352 .read = scdrv_read, 353 353 .write = scdrv_write,
+1 -1
drivers/char/sonypi.c
··· 1106 1106 return ret; 1107 1107 } 1108 1108 1109 - static struct file_operations sonypi_misc_fops = { 1109 + static const struct file_operations sonypi_misc_fops = { 1110 1110 .owner = THIS_MODULE, 1111 1111 .read = sonypi_misc_read, 1112 1112 .poll = sonypi_misc_poll,
+1 -1
drivers/char/stallion.c
··· 707 707 * Define the driver info for a user level control device. Used mainly 708 708 * to get at port stats - only not using the port device itself. 709 709 */ 710 - static struct file_operations stl_fsiomem = { 710 + static const struct file_operations stl_fsiomem = { 711 711 .owner = THIS_MODULE, 712 712 .ioctl = stl_memioctl, 713 713 };
+1 -1
drivers/char/sx.c
··· 410 410 * 411 411 */ 412 412 413 - static struct file_operations sx_fw_fops = { 413 + static const struct file_operations sx_fw_fops = { 414 414 .owner = THIS_MODULE, 415 415 .ioctl = sx_fw_ioctl, 416 416 };
+1 -1
drivers/char/tb0219.c
··· 255 255 return 0; 256 256 } 257 257 258 - static struct file_operations tb0219_fops = { 258 + static const struct file_operations tb0219_fops = { 259 259 .owner = THIS_MODULE, 260 260 .read = tanbac_tb0219_read, 261 261 .write = tanbac_tb0219_write,
+1 -1
drivers/char/tipar.c
··· 381 381 382 382 /* ----- kernel module registering ------------------------------------ */ 383 383 384 - static struct file_operations tipar_fops = { 384 + static const struct file_operations tipar_fops = { 385 385 .owner = THIS_MODULE, 386 386 .llseek = no_llseek, 387 387 .read = tipar_read,
+1 -1
drivers/char/tlclk.c
··· 247 247 return 0; 248 248 } 249 249 250 - static struct file_operations tlclk_fops = { 250 + static const struct file_operations tlclk_fops = { 251 251 .read = tlclk_read, 252 252 .write = tlclk_write, 253 253 .open = tlclk_open,
+1 -1
drivers/char/toshiba.c
··· 92 92 unsigned long); 93 93 94 94 95 - static struct file_operations tosh_fops = { 95 + static const struct file_operations tosh_fops = { 96 96 .owner = THIS_MODULE, 97 97 .ioctl = tosh_ioctl, 98 98 };
+1 -1
drivers/char/tpm/tpm_atmel.c
··· 116 116 return ioread8(chip->vendor.iobase + 1); 117 117 } 118 118 119 - static struct file_operations atmel_ops = { 119 + static const struct file_operations atmel_ops = { 120 120 .owner = THIS_MODULE, 121 121 .llseek = no_llseek, 122 122 .open = tpm_open,
+1 -1
drivers/char/tpm/tpm_infineon.c
··· 338 338 339 339 static struct attribute_group inf_attr_grp = {.attrs = inf_attrs }; 340 340 341 - static struct file_operations inf_ops = { 341 + static const struct file_operations inf_ops = { 342 342 .owner = THIS_MODULE, 343 343 .llseek = no_llseek, 344 344 .open = tpm_open,
+1 -1
drivers/char/tpm/tpm_nsc.c
··· 226 226 return inb(chip->vendor.base + NSC_STATUS); 227 227 } 228 228 229 - static struct file_operations nsc_ops = { 229 + static const struct file_operations nsc_ops = { 230 230 .owner = THIS_MODULE, 231 231 .llseek = no_llseek, 232 232 .open = tpm_open,
+1 -1
drivers/char/tpm/tpm_tis.c
··· 330 330 return rc; 331 331 } 332 332 333 - static struct file_operations tis_ops = { 333 + static const struct file_operations tis_ops = { 334 334 .owner = THIS_MODULE, 335 335 .llseek = no_llseek, 336 336 .open = tpm_open,
+4 -4
drivers/char/tty_io.c
··· 912 912 return cmd == TIOCSPGRP ? -ENOTTY : -EIO; 913 913 } 914 914 915 - static struct file_operations tty_fops = { 915 + static const struct file_operations tty_fops = { 916 916 .llseek = no_llseek, 917 917 .read = tty_read, 918 918 .write = tty_write, ··· 924 924 }; 925 925 926 926 #ifdef CONFIG_UNIX98_PTYS 927 - static struct file_operations ptmx_fops = { 927 + static const struct file_operations ptmx_fops = { 928 928 .llseek = no_llseek, 929 929 .read = tty_read, 930 930 .write = tty_write, ··· 936 936 }; 937 937 #endif 938 938 939 - static struct file_operations console_fops = { 939 + static const struct file_operations console_fops = { 940 940 .llseek = no_llseek, 941 941 .read = tty_read, 942 942 .write = redirected_tty_write, ··· 947 947 .fasync = tty_fasync, 948 948 }; 949 949 950 - static struct file_operations hung_up_tty_fops = { 950 + static const struct file_operations hung_up_tty_fops = { 951 951 .llseek = no_llseek, 952 952 .read = hung_up_tty_read, 953 953 .write = hung_up_tty_write,
+1 -1
drivers/char/vc_screen.c
··· 465 465 return 0; 466 466 } 467 467 468 - static struct file_operations vcs_fops = { 468 + static const struct file_operations vcs_fops = { 469 469 .llseek = vcs_lseek, 470 470 .read = vcs_read, 471 471 .write = vcs_write,
+1 -1
drivers/char/viotape.c
··· 292 292 return single_open(file, proc_viotape_show, NULL); 293 293 } 294 294 295 - static struct file_operations proc_viotape_operations = { 295 + static const struct file_operations proc_viotape_operations = { 296 296 .open = proc_viotape_open, 297 297 .read = seq_read, 298 298 .llseek = seq_lseek,
+1 -1
drivers/char/vr41xx_giu.c
··· 605 605 return 0; 606 606 } 607 607 608 - static struct file_operations gpio_fops = { 608 + static const struct file_operations gpio_fops = { 609 609 .owner = THIS_MODULE, 610 610 .read = gpio_read, 611 611 .write = gpio_write,
+1 -1
drivers/char/watchdog/acquirewdt.c
··· 231 231 * Kernel Interfaces 232 232 */ 233 233 234 - static struct file_operations acq_fops = { 234 + static const struct file_operations acq_fops = { 235 235 .owner = THIS_MODULE, 236 236 .llseek = no_llseek, 237 237 .write = acq_write,
+1 -1
drivers/char/watchdog/advantechwdt.c
··· 227 227 * Kernel Interfaces 228 228 */ 229 229 230 - static struct file_operations advwdt_fops = { 230 + static const struct file_operations advwdt_fops = { 231 231 .owner = THIS_MODULE, 232 232 .llseek = no_llseek, 233 233 .write = advwdt_write,
+1 -1
drivers/char/watchdog/alim1535_wdt.c
··· 362 362 * Kernel Interfaces 363 363 */ 364 364 365 - static struct file_operations ali_fops = { 365 + static const struct file_operations ali_fops = { 366 366 .owner = THIS_MODULE, 367 367 .llseek = no_llseek, 368 368 .write = ali_write,
+1 -1
drivers/char/watchdog/alim7101_wdt.c
··· 281 281 } 282 282 } 283 283 284 - static struct file_operations wdt_fops = { 284 + static const struct file_operations wdt_fops = { 285 285 .owner= THIS_MODULE, 286 286 .llseek= no_llseek, 287 287 .write= fop_write,
+1 -1
drivers/char/watchdog/at91_wdt.c
··· 183 183 184 184 /* ......................................................................... */ 185 185 186 - static struct file_operations at91wdt_fops = { 186 + static const struct file_operations at91wdt_fops = { 187 187 .owner = THIS_MODULE, 188 188 .llseek = no_llseek, 189 189 .ioctl = at91_wdt_ioctl,
+1 -1
drivers/char/watchdog/booke_wdt.c
··· 145 145 return 0; 146 146 } 147 147 148 - static struct file_operations booke_wdt_fops = { 148 + static const struct file_operations booke_wdt_fops = { 149 149 .owner = THIS_MODULE, 150 150 .llseek = no_llseek, 151 151 .write = booke_wdt_write,
+1 -1
drivers/char/watchdog/cpu5wdt.c
··· 198 198 return count; 199 199 } 200 200 201 - static struct file_operations cpu5wdt_fops = { 201 + static const struct file_operations cpu5wdt_fops = { 202 202 .owner = THIS_MODULE, 203 203 .llseek = no_llseek, 204 204 .ioctl = cpu5wdt_ioctl,
+1 -1
drivers/char/watchdog/ep93xx_wdt.c
··· 187 187 return 0; 188 188 } 189 189 190 - static struct file_operations ep93xx_wdt_fops = { 190 + static const struct file_operations ep93xx_wdt_fops = { 191 191 .owner = THIS_MODULE, 192 192 .write = ep93xx_wdt_write, 193 193 .ioctl = ep93xx_wdt_ioctl,
+1 -1
drivers/char/watchdog/eurotechwdt.c
··· 356 356 */ 357 357 358 358 359 - static struct file_operations eurwdt_fops = { 359 + static const struct file_operations eurwdt_fops = { 360 360 .owner = THIS_MODULE, 361 361 .llseek = no_llseek, 362 362 .write = eurwdt_write,
+1 -1
drivers/char/watchdog/i6300esb.c
··· 337 337 * Kernel Interfaces 338 338 */ 339 339 340 - static struct file_operations esb_fops = { 340 + static const struct file_operations esb_fops = { 341 341 .owner = THIS_MODULE, 342 342 .llseek = no_llseek, 343 343 .write = esb_write,
+1 -1
drivers/char/watchdog/i8xx_tco.c
··· 378 378 * Kernel Interfaces 379 379 */ 380 380 381 - static struct file_operations i8xx_tco_fops = { 381 + static const struct file_operations i8xx_tco_fops = { 382 382 .owner = THIS_MODULE, 383 383 .llseek = no_llseek, 384 384 .write = i8xx_tco_write,
+1 -1
drivers/char/watchdog/ib700wdt.c
··· 255 255 * Kernel Interfaces 256 256 */ 257 257 258 - static struct file_operations ibwdt_fops = { 258 + static const struct file_operations ibwdt_fops = { 259 259 .owner = THIS_MODULE, 260 260 .llseek = no_llseek, 261 261 .write = ibwdt_write,
+1 -1
drivers/char/watchdog/ibmasr.c
··· 322 322 return 0; 323 323 } 324 324 325 - static struct file_operations asr_fops = { 325 + static const struct file_operations asr_fops = { 326 326 .owner = THIS_MODULE, 327 327 .llseek = no_llseek, 328 328 .write = asr_write,
+1 -1
drivers/char/watchdog/indydog.c
··· 154 154 return NOTIFY_DONE; 155 155 } 156 156 157 - static struct file_operations indydog_fops = { 157 + static const struct file_operations indydog_fops = { 158 158 .owner = THIS_MODULE, 159 159 .llseek = no_llseek, 160 160 .write = indydog_write,
+1 -1
drivers/char/watchdog/ixp2000_wdt.c
··· 168 168 } 169 169 170 170 171 - static struct file_operations ixp2000_wdt_fops = 171 + static const struct file_operations ixp2000_wdt_fops = 172 172 { 173 173 .owner = THIS_MODULE, 174 174 .llseek = no_llseek,
+1 -1
drivers/char/watchdog/ixp4xx_wdt.c
··· 162 162 } 163 163 164 164 165 - static struct file_operations ixp4xx_wdt_fops = 165 + static const struct file_operations ixp4xx_wdt_fops = 166 166 { 167 167 .owner = THIS_MODULE, 168 168 .llseek = no_llseek,
+1 -1
drivers/char/watchdog/machzwd.c
··· 388 388 389 389 390 390 391 - static struct file_operations zf_fops = { 391 + static const struct file_operations zf_fops = { 392 392 .owner = THIS_MODULE, 393 393 .llseek = no_llseek, 394 394 .write = zf_write,
+1 -1
drivers/char/watchdog/mixcomwd.c
··· 190 190 return 0; 191 191 } 192 192 193 - static struct file_operations mixcomwd_fops= 193 + static const struct file_operations mixcomwd_fops= 194 194 { 195 195 .owner = THIS_MODULE, 196 196 .llseek = no_llseek,
+1 -1
drivers/char/watchdog/mpc83xx_wdt.c
··· 129 129 } 130 130 } 131 131 132 - static struct file_operations mpc83xx_wdt_fops = { 132 + static const struct file_operations mpc83xx_wdt_fops = { 133 133 .owner = THIS_MODULE, 134 134 .llseek = no_llseek, 135 135 .write = mpc83xx_wdt_write,
+1 -1
drivers/char/watchdog/mpc8xx_wdt.c
··· 132 132 return 0; 133 133 } 134 134 135 - static struct file_operations mpc8xx_wdt_fops = { 135 + static const struct file_operations mpc8xx_wdt_fops = { 136 136 .owner = THIS_MODULE, 137 137 .llseek = no_llseek, 138 138 .write = mpc8xx_wdt_write,
+1 -1
drivers/char/watchdog/mpcore_wdt.c
··· 297 297 /* 298 298 * Kernel Interfaces 299 299 */ 300 - static struct file_operations mpcore_wdt_fops = { 300 + static const struct file_operations mpcore_wdt_fops = { 301 301 .owner = THIS_MODULE, 302 302 .llseek = no_llseek, 303 303 .write = mpcore_wdt_write,
+1 -1
drivers/char/watchdog/mv64x60_wdt.c
··· 166 166 return 0; 167 167 } 168 168 169 - static struct file_operations mv64x60_wdt_fops = { 169 + static const struct file_operations mv64x60_wdt_fops = { 170 170 .owner = THIS_MODULE, 171 171 .llseek = no_llseek, 172 172 .write = mv64x60_wdt_write,
+2 -2
drivers/char/watchdog/pcwd.c
··· 740 740 * Kernel Interfaces 741 741 */ 742 742 743 - static struct file_operations pcwd_fops = { 743 + static const struct file_operations pcwd_fops = { 744 744 .owner = THIS_MODULE, 745 745 .llseek = no_llseek, 746 746 .write = pcwd_write, ··· 755 755 .fops = &pcwd_fops, 756 756 }; 757 757 758 - static struct file_operations pcwd_temp_fops = { 758 + static const struct file_operations pcwd_temp_fops = { 759 759 .owner = THIS_MODULE, 760 760 .llseek = no_llseek, 761 761 .read = pcwd_temp_read,
+2 -2
drivers/char/watchdog/pcwd_pci.c
··· 625 625 * Kernel Interfaces 626 626 */ 627 627 628 - static struct file_operations pcipcwd_fops = { 628 + static const struct file_operations pcipcwd_fops = { 629 629 .owner = THIS_MODULE, 630 630 .llseek = no_llseek, 631 631 .write = pcipcwd_write, ··· 640 640 .fops = &pcipcwd_fops, 641 641 }; 642 642 643 - static struct file_operations pcipcwd_temp_fops = { 643 + static const struct file_operations pcipcwd_temp_fops = { 644 644 .owner = THIS_MODULE, 645 645 .llseek = no_llseek, 646 646 .read = pcipcwd_temp_read,
+2 -2
drivers/char/watchdog/pcwd_usb.c
··· 523 523 * Kernel Interfaces 524 524 */ 525 525 526 - static struct file_operations usb_pcwd_fops = { 526 + static const struct file_operations usb_pcwd_fops = { 527 527 .owner = THIS_MODULE, 528 528 .llseek = no_llseek, 529 529 .write = usb_pcwd_write, ··· 538 538 .fops = &usb_pcwd_fops, 539 539 }; 540 540 541 - static struct file_operations usb_pcwd_temperature_fops = { 541 + static const struct file_operations usb_pcwd_temperature_fops = { 542 542 .owner = THIS_MODULE, 543 543 .llseek = no_llseek, 544 544 .read = usb_pcwd_temperature_read,
+1 -1
drivers/char/watchdog/s3c2410_wdt.c
··· 319 319 320 320 /* kernel interface */ 321 321 322 - static struct file_operations s3c2410wdt_fops = { 322 + static const struct file_operations s3c2410wdt_fops = { 323 323 .owner = THIS_MODULE, 324 324 .llseek = no_llseek, 325 325 .write = s3c2410wdt_write,
+1 -1
drivers/char/watchdog/sa1100_wdt.c
··· 135 135 return ret; 136 136 } 137 137 138 - static struct file_operations sa1100dog_fops = 138 + static const struct file_operations sa1100dog_fops = 139 139 { 140 140 .owner = THIS_MODULE, 141 141 .llseek = no_llseek,
+1 -1
drivers/char/watchdog/sbc60xxwdt.c
··· 282 282 } 283 283 } 284 284 285 - static struct file_operations wdt_fops = { 285 + static const struct file_operations wdt_fops = { 286 286 .owner = THIS_MODULE, 287 287 .llseek = no_llseek, 288 288 .write = fop_write,
+1 -1
drivers/char/watchdog/sbc8360.c
··· 305 305 * Kernel Interfaces 306 306 */ 307 307 308 - static struct file_operations sbc8360_fops = { 308 + static const struct file_operations sbc8360_fops = { 309 309 .owner = THIS_MODULE, 310 310 .llseek = no_llseek, 311 311 .write = sbc8360_write,
+1 -1
drivers/char/watchdog/sbc_epx_c3.c
··· 154 154 return NOTIFY_DONE; 155 155 } 156 156 157 - static struct file_operations epx_c3_fops = { 157 + static const struct file_operations epx_c3_fops = { 158 158 .owner = THIS_MODULE, 159 159 .llseek = no_llseek, 160 160 .write = epx_c3_write,
+1 -1
drivers/char/watchdog/sc1200wdt.c
··· 292 292 .notifier_call = sc1200wdt_notify_sys, 293 293 }; 294 294 295 - static struct file_operations sc1200wdt_fops = 295 + static const struct file_operations sc1200wdt_fops = 296 296 { 297 297 .owner = THIS_MODULE, 298 298 .llseek = no_llseek,
+1 -1
drivers/char/watchdog/sc520_wdt.c
··· 336 336 } 337 337 } 338 338 339 - static struct file_operations wdt_fops = { 339 + static const struct file_operations wdt_fops = { 340 340 .owner = THIS_MODULE, 341 341 .llseek = no_llseek, 342 342 .write = fop_write,
+1 -1
drivers/char/watchdog/scx200_wdt.c
··· 194 194 } 195 195 } 196 196 197 - static struct file_operations scx200_wdt_fops = { 197 + static const struct file_operations scx200_wdt_fops = { 198 198 .owner = THIS_MODULE, 199 199 .llseek = no_llseek, 200 200 .write = scx200_wdt_write,
+1 -1
drivers/char/watchdog/shwdt.c
··· 344 344 return NOTIFY_DONE; 345 345 } 346 346 347 - static struct file_operations sh_wdt_fops = { 347 + static const struct file_operations sh_wdt_fops = { 348 348 .owner = THIS_MODULE, 349 349 .llseek = no_llseek, 350 350 .write = sh_wdt_write,
+1 -1
drivers/char/watchdog/softdog.c
··· 243 243 * Kernel Interfaces 244 244 */ 245 245 246 - static struct file_operations softdog_fops = { 246 + static const struct file_operations softdog_fops = { 247 247 .owner = THIS_MODULE, 248 248 .llseek = no_llseek, 249 249 .write = softdog_write,
+1 -1
drivers/char/watchdog/w83627hf_wdt.c
··· 274 274 * Kernel Interfaces 275 275 */ 276 276 277 - static struct file_operations wdt_fops = { 277 + static const struct file_operations wdt_fops = { 278 278 .owner = THIS_MODULE, 279 279 .llseek = no_llseek, 280 280 .write = wdt_write,
+1 -1
drivers/char/watchdog/w83877f_wdt.c
··· 299 299 } 300 300 } 301 301 302 - static struct file_operations wdt_fops = { 302 + static const struct file_operations wdt_fops = { 303 303 .owner = THIS_MODULE, 304 304 .llseek = no_llseek, 305 305 .write = fop_write,
+1 -1
drivers/char/watchdog/w83977f_wdt.c
··· 449 449 return NOTIFY_DONE; 450 450 } 451 451 452 - static struct file_operations wdt_fops= 452 + static const struct file_operations wdt_fops= 453 453 { 454 454 .owner = THIS_MODULE, 455 455 .llseek = no_llseek,
+1 -1
drivers/char/watchdog/wafer5823wdt.c
··· 222 222 * Kernel Interfaces 223 223 */ 224 224 225 - static struct file_operations wafwdt_fops = { 225 + static const struct file_operations wafwdt_fops = { 226 226 .owner = THIS_MODULE, 227 227 .llseek = no_llseek, 228 228 .write = wafwdt_write,
+2 -2
drivers/char/watchdog/wdrtas.c
··· 520 520 521 521 /*** initialization stuff */ 522 522 523 - static struct file_operations wdrtas_fops = { 523 + static const struct file_operations wdrtas_fops = { 524 524 .owner = THIS_MODULE, 525 525 .llseek = no_llseek, 526 526 .write = wdrtas_write, ··· 535 535 .fops = &wdrtas_fops, 536 536 }; 537 537 538 - static struct file_operations wdrtas_temp_fops = { 538 + static const struct file_operations wdrtas_temp_fops = { 539 539 .owner = THIS_MODULE, 540 540 .llseek = no_llseek, 541 541 .read = wdrtas_temp_read,
+2 -2
drivers/char/watchdog/wdt.c
··· 494 494 */ 495 495 496 496 497 - static struct file_operations wdt_fops = { 497 + static const struct file_operations wdt_fops = { 498 498 .owner = THIS_MODULE, 499 499 .llseek = no_llseek, 500 500 .write = wdt_write, ··· 510 510 }; 511 511 512 512 #ifdef CONFIG_WDT_501 513 - static struct file_operations wdt_temp_fops = { 513 + static const struct file_operations wdt_temp_fops = { 514 514 .owner = THIS_MODULE, 515 515 .llseek = no_llseek, 516 516 .read = wdt_temp_read,
+1 -1
drivers/char/watchdog/wdt285.c
··· 178 178 return ret; 179 179 } 180 180 181 - static struct file_operations watchdog_fops = { 181 + static const struct file_operations watchdog_fops = { 182 182 .owner = THIS_MODULE, 183 183 .llseek = no_llseek, 184 184 .write = watchdog_write,
+1 -1
drivers/char/watchdog/wdt977.c
··· 418 418 return NOTIFY_DONE; 419 419 } 420 420 421 - static struct file_operations wdt977_fops= 421 + static const struct file_operations wdt977_fops= 422 422 { 423 423 .owner = THIS_MODULE, 424 424 .llseek = no_llseek,
+2 -2
drivers/char/watchdog/wdt_pci.c
··· 543 543 */ 544 544 545 545 546 - static struct file_operations wdtpci_fops = { 546 + static const struct file_operations wdtpci_fops = { 547 547 .owner = THIS_MODULE, 548 548 .llseek = no_llseek, 549 549 .write = wdtpci_write, ··· 559 559 }; 560 560 561 561 #ifdef CONFIG_WDT_501_PCI 562 - static struct file_operations wdtpci_temp_fops = { 562 + static const struct file_operations wdtpci_temp_fops = { 563 563 .owner = THIS_MODULE, 564 564 .llseek = no_llseek, 565 565 .read = wdtpci_temp_read,