Commit d54b1fdb1d9f82e375a299e22bd366aad52d4c34

Authored by Arjan van de Ven
Committed by Linus Torvalds
1 parent fa027c2a0a

[PATCH] mark struct file_operations const 5

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>

Showing 45 changed files with 89 additions and 89 deletions Side-by-side Diff

drivers/message/i2o/i2o_config.c
... ... @@ -1111,7 +1111,7 @@
1111 1111 return 0;
1112 1112 }
1113 1113  
1114   -static struct file_operations config_fops = {
  1114 +static const struct file_operations config_fops = {
1115 1115 .owner = THIS_MODULE,
1116 1116 .llseek = no_llseek,
1117 1117 .ioctl = i2o_cfg_ioctl,
drivers/message/i2o/i2o_proc.c
... ... @@ -1703,133 +1703,133 @@
1703 1703 return single_open(file, i2o_seq_show_dev_name, PDE(inode)->data);
1704 1704 };
1705 1705  
1706   -static struct file_operations i2o_seq_fops_lct = {
  1706 +static const struct file_operations i2o_seq_fops_lct = {
1707 1707 .open = i2o_seq_open_lct,
1708 1708 .read = seq_read,
1709 1709 .llseek = seq_lseek,
1710 1710 .release = single_release,
1711 1711 };
1712 1712  
1713   -static struct file_operations i2o_seq_fops_hrt = {
  1713 +static const struct file_operations i2o_seq_fops_hrt = {
1714 1714 .open = i2o_seq_open_hrt,
1715 1715 .read = seq_read,
1716 1716 .llseek = seq_lseek,
1717 1717 .release = single_release,
1718 1718 };
1719 1719  
1720   -static struct file_operations i2o_seq_fops_status = {
  1720 +static const struct file_operations i2o_seq_fops_status = {
1721 1721 .open = i2o_seq_open_status,
1722 1722 .read = seq_read,
1723 1723 .llseek = seq_lseek,
1724 1724 .release = single_release,
1725 1725 };
1726 1726  
1727   -static struct file_operations i2o_seq_fops_hw = {
  1727 +static const struct file_operations i2o_seq_fops_hw = {
1728 1728 .open = i2o_seq_open_hw,
1729 1729 .read = seq_read,
1730 1730 .llseek = seq_lseek,
1731 1731 .release = single_release,
1732 1732 };
1733 1733  
1734   -static struct file_operations i2o_seq_fops_ddm_table = {
  1734 +static const struct file_operations i2o_seq_fops_ddm_table = {
1735 1735 .open = i2o_seq_open_ddm_table,
1736 1736 .read = seq_read,
1737 1737 .llseek = seq_lseek,
1738 1738 .release = single_release,
1739 1739 };
1740 1740  
1741   -static struct file_operations i2o_seq_fops_driver_store = {
  1741 +static const struct file_operations i2o_seq_fops_driver_store = {
1742 1742 .open = i2o_seq_open_driver_store,
1743 1743 .read = seq_read,
1744 1744 .llseek = seq_lseek,
1745 1745 .release = single_release,
1746 1746 };
1747 1747  
1748   -static struct file_operations i2o_seq_fops_drivers_stored = {
  1748 +static const struct file_operations i2o_seq_fops_drivers_stored = {
1749 1749 .open = i2o_seq_open_drivers_stored,
1750 1750 .read = seq_read,
1751 1751 .llseek = seq_lseek,
1752 1752 .release = single_release,
1753 1753 };
1754 1754  
1755   -static struct file_operations i2o_seq_fops_groups = {
  1755 +static const struct file_operations i2o_seq_fops_groups = {
1756 1756 .open = i2o_seq_open_groups,
1757 1757 .read = seq_read,
1758 1758 .llseek = seq_lseek,
1759 1759 .release = single_release,
1760 1760 };
1761 1761  
1762   -static struct file_operations i2o_seq_fops_phys_device = {
  1762 +static const struct file_operations i2o_seq_fops_phys_device = {
1763 1763 .open = i2o_seq_open_phys_device,
1764 1764 .read = seq_read,
1765 1765 .llseek = seq_lseek,
1766 1766 .release = single_release,
1767 1767 };
1768 1768  
1769   -static struct file_operations i2o_seq_fops_claimed = {
  1769 +static const struct file_operations i2o_seq_fops_claimed = {
1770 1770 .open = i2o_seq_open_claimed,
1771 1771 .read = seq_read,
1772 1772 .llseek = seq_lseek,
1773 1773 .release = single_release,
1774 1774 };
1775 1775  
1776   -static struct file_operations i2o_seq_fops_users = {
  1776 +static const struct file_operations i2o_seq_fops_users = {
1777 1777 .open = i2o_seq_open_users,
1778 1778 .read = seq_read,
1779 1779 .llseek = seq_lseek,
1780 1780 .release = single_release,
1781 1781 };
1782 1782  
1783   -static struct file_operations i2o_seq_fops_priv_msgs = {
  1783 +static const struct file_operations i2o_seq_fops_priv_msgs = {
1784 1784 .open = i2o_seq_open_priv_msgs,
1785 1785 .read = seq_read,
1786 1786 .llseek = seq_lseek,
1787 1787 .release = single_release,
1788 1788 };
1789 1789  
1790   -static struct file_operations i2o_seq_fops_authorized_users = {
  1790 +static const struct file_operations i2o_seq_fops_authorized_users = {
1791 1791 .open = i2o_seq_open_authorized_users,
1792 1792 .read = seq_read,
1793 1793 .llseek = seq_lseek,
1794 1794 .release = single_release,
1795 1795 };
1796 1796  
1797   -static struct file_operations i2o_seq_fops_dev_name = {
  1797 +static const struct file_operations i2o_seq_fops_dev_name = {
1798 1798 .open = i2o_seq_open_dev_name,
1799 1799 .read = seq_read,
1800 1800 .llseek = seq_lseek,
1801 1801 .release = single_release,
1802 1802 };
1803 1803  
1804   -static struct file_operations i2o_seq_fops_dev_identity = {
  1804 +static const struct file_operations i2o_seq_fops_dev_identity = {
1805 1805 .open = i2o_seq_open_dev_identity,
1806 1806 .read = seq_read,
1807 1807 .llseek = seq_lseek,
1808 1808 .release = single_release,
1809 1809 };
1810 1810  
1811   -static struct file_operations i2o_seq_fops_ddm_identity = {
  1811 +static const struct file_operations i2o_seq_fops_ddm_identity = {
1812 1812 .open = i2o_seq_open_ddm_identity,
1813 1813 .read = seq_read,
1814 1814 .llseek = seq_lseek,
1815 1815 .release = single_release,
1816 1816 };
1817 1817  
1818   -static struct file_operations i2o_seq_fops_uinfo = {
  1818 +static const struct file_operations i2o_seq_fops_uinfo = {
1819 1819 .open = i2o_seq_open_uinfo,
1820 1820 .read = seq_read,
1821 1821 .llseek = seq_lseek,
1822 1822 .release = single_release,
1823 1823 };
1824 1824  
1825   -static struct file_operations i2o_seq_fops_sgl_limits = {
  1825 +static const struct file_operations i2o_seq_fops_sgl_limits = {
1826 1826 .open = i2o_seq_open_sgl_limits,
1827 1827 .read = seq_read,
1828 1828 .llseek = seq_lseek,
1829 1829 .release = single_release,
1830 1830 };
1831 1831  
1832   -static struct file_operations i2o_seq_fops_sensors = {
  1832 +static const struct file_operations i2o_seq_fops_sensors = {
1833 1833 .open = i2o_seq_open_sensors,
1834 1834 .read = seq_read,
1835 1835 .llseek = seq_lseek,
drivers/misc/hdpuftrs/hdpu_cpustate.c
... ... @@ -169,7 +169,7 @@
169 169 /*
170 170 * The various file operations we support.
171 171 */
172   -static struct file_operations cpustate_fops = {
  172 +static const struct file_operations cpustate_fops = {
173 173 owner:THIS_MODULE,
174 174 open:cpustate_open,
175 175 release:cpustate_release,
drivers/misc/ibmasm/ibmasmfs.c
... ... @@ -156,7 +156,7 @@
156 156 static struct dentry *ibmasmfs_create_file (struct super_block *sb,
157 157 struct dentry *parent,
158 158 const char *name,
159   - struct file_operations *fops,
  159 + const struct file_operations *fops,
160 160 void *data,
161 161 int mode)
162 162 {
163 163  
164 164  
165 165  
... ... @@ -581,28 +581,28 @@
581 581 return count;
582 582 }
583 583  
584   -static struct file_operations command_fops = {
  584 +static const struct file_operations command_fops = {
585 585 .open = command_file_open,
586 586 .release = command_file_close,
587 587 .read = command_file_read,
588 588 .write = command_file_write,
589 589 };
590 590  
591   -static struct file_operations event_fops = {
  591 +static const struct file_operations event_fops = {
592 592 .open = event_file_open,
593 593 .release = event_file_close,
594 594 .read = event_file_read,
595 595 .write = event_file_write,
596 596 };
597 597  
598   -static struct file_operations r_heartbeat_fops = {
  598 +static const struct file_operations r_heartbeat_fops = {
599 599 .open = r_heartbeat_file_open,
600 600 .release = r_heartbeat_file_close,
601 601 .read = r_heartbeat_file_read,
602 602 .write = r_heartbeat_file_write,
603 603 };
604 604  
605   -static struct file_operations remote_settings_fops = {
  605 +static const struct file_operations remote_settings_fops = {
606 606 .open = remote_settings_file_open,
607 607 .release = remote_settings_file_close,
608 608 .read = remote_settings_file_read,
drivers/mtd/mtdchar.c
... ... @@ -759,7 +759,7 @@
759 759 return ret;
760 760 } /* memory_ioctl */
761 761  
762   -static struct file_operations mtd_fops = {
  762 +static const struct file_operations mtd_fops = {
763 763 .owner = THIS_MODULE,
764 764 .llseek = mtd_lseek,
765 765 .read = mtd_read,
drivers/net/bonding/bond_main.c
... ... @@ -3120,7 +3120,7 @@
3120 3120 return res;
3121 3121 }
3122 3122  
3123   -static struct file_operations bond_info_fops = {
  3123 +static const struct file_operations bond_info_fops = {
3124 3124 .owner = THIS_MODULE,
3125 3125 .open = bond_info_open,
3126 3126 .read = seq_read,
drivers/net/hamradio/bpqether.c
... ... @@ -459,7 +459,7 @@
459 459 return seq_open(file, &bpq_seqops);
460 460 }
461 461  
462   -static struct file_operations bpq_info_fops = {
  462 +static const struct file_operations bpq_info_fops = {
463 463 .owner = THIS_MODULE,
464 464 .open = bpq_info_open,
465 465 .read = seq_read,
drivers/net/hamradio/scc.c
... ... @@ -2083,7 +2083,7 @@
2083 2083 return seq_open(file, &scc_net_seq_ops);
2084 2084 }
2085 2085  
2086   -static struct file_operations scc_net_seq_fops = {
  2086 +static const struct file_operations scc_net_seq_fops = {
2087 2087 .owner = THIS_MODULE,
2088 2088 .open = scc_net_seq_open,
2089 2089 .read = seq_read,
drivers/net/hamradio/yam.c
... ... @@ -804,7 +804,7 @@
804 804 return seq_open(file, &yam_seqops);
805 805 }
806 806  
807   -static struct file_operations yam_info_fops = {
  807 +static const struct file_operations yam_info_fops = {
808 808 .owner = THIS_MODULE,
809 809 .open = yam_info_open,
810 810 .read = seq_read,
drivers/net/ibmveth.c
... ... @@ -1156,7 +1156,7 @@
1156 1156 return rc;
1157 1157 }
1158 1158  
1159   -static struct file_operations ibmveth_proc_fops = {
  1159 +static const struct file_operations ibmveth_proc_fops = {
1160 1160 .owner = THIS_MODULE,
1161 1161 .open = ibmveth_proc_open,
1162 1162 .read = seq_read,
drivers/net/irda/vlsi_ir.c
... ... @@ -385,7 +385,7 @@
385 385 return single_open(file, vlsi_seq_show, PDE(inode)->data);
386 386 }
387 387  
388   -static struct file_operations vlsi_proc_fops = {
  388 +static const struct file_operations vlsi_proc_fops = {
389 389 .owner = THIS_MODULE,
390 390 .open = vlsi_seq_open,
391 391 .read = seq_read,
drivers/net/ppp_generic.c
... ... @@ -834,7 +834,7 @@
834 834 return err;
835 835 }
836 836  
837   -static struct file_operations ppp_device_fops = {
  837 +static const struct file_operations ppp_device_fops = {
838 838 .owner = THIS_MODULE,
839 839 .read = ppp_read,
840 840 .write = ppp_write,
... ... @@ -1043,7 +1043,7 @@
1043 1043 return seq_open(file, &pppoe_seq_ops);
1044 1044 }
1045 1045  
1046   -static struct file_operations pppoe_seq_fops = {
  1046 +static const struct file_operations pppoe_seq_fops = {
1047 1047 .owner = THIS_MODULE,
1048 1048 .open = pppoe_seq_open,
1049 1049 .read = seq_read,
... ... @@ -744,7 +744,7 @@
744 744 return 0;
745 745 }
746 746  
747   -static struct file_operations tun_fops = {
  747 +static const struct file_operations tun_fops = {
748 748 .owner = THIS_MODULE,
749 749 .llseek = no_llseek,
750 750 .read = do_sync_read,
drivers/net/wan/cosa.c
... ... @@ -311,7 +311,7 @@
311 311 static int cosa_fasync(struct inode *inode, struct file *file, int on);
312 312 #endif
313 313  
314   -static struct file_operations cosa_fops = {
  314 +static const struct file_operations cosa_fops = {
315 315 .owner = THIS_MODULE,
316 316 .llseek = no_llseek,
317 317 .read = cosa_read,
drivers/net/wireless/airo.c
... ... @@ -4430,53 +4430,53 @@
4430 4430 static int proc_config_open( struct inode *inode, struct file *file );
4431 4431 static int proc_wepkey_open( struct inode *inode, struct file *file );
4432 4432  
4433   -static struct file_operations proc_statsdelta_ops = {
  4433 +static const struct file_operations proc_statsdelta_ops = {
4434 4434 .read = proc_read,
4435 4435 .open = proc_statsdelta_open,
4436 4436 .release = proc_close
4437 4437 };
4438 4438  
4439   -static struct file_operations proc_stats_ops = {
  4439 +static const struct file_operations proc_stats_ops = {
4440 4440 .read = proc_read,
4441 4441 .open = proc_stats_open,
4442 4442 .release = proc_close
4443 4443 };
4444 4444  
4445   -static struct file_operations proc_status_ops = {
  4445 +static const struct file_operations proc_status_ops = {
4446 4446 .read = proc_read,
4447 4447 .open = proc_status_open,
4448 4448 .release = proc_close
4449 4449 };
4450 4450  
4451   -static struct file_operations proc_SSID_ops = {
  4451 +static const struct file_operations proc_SSID_ops = {
4452 4452 .read = proc_read,
4453 4453 .write = proc_write,
4454 4454 .open = proc_SSID_open,
4455 4455 .release = proc_close
4456 4456 };
4457 4457  
4458   -static struct file_operations proc_BSSList_ops = {
  4458 +static const struct file_operations proc_BSSList_ops = {
4459 4459 .read = proc_read,
4460 4460 .write = proc_write,
4461 4461 .open = proc_BSSList_open,
4462 4462 .release = proc_close
4463 4463 };
4464 4464  
4465   -static struct file_operations proc_APList_ops = {
  4465 +static const struct file_operations proc_APList_ops = {
4466 4466 .read = proc_read,
4467 4467 .write = proc_write,
4468 4468 .open = proc_APList_open,
4469 4469 .release = proc_close
4470 4470 };
4471 4471  
4472   -static struct file_operations proc_config_ops = {
  4472 +static const struct file_operations proc_config_ops = {
4473 4473 .read = proc_read,
4474 4474 .write = proc_write,
4475 4475 .open = proc_config_open,
4476 4476 .release = proc_close
4477 4477 };
4478 4478  
4479   -static struct file_operations proc_wepkey_ops = {
  4479 +static const struct file_operations proc_wepkey_ops = {
4480 4480 .read = proc_read,
4481 4481 .write = proc_write,
4482 4482 .open = proc_wepkey_open,
drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c
... ... @@ -355,37 +355,37 @@
355 355 #undef fappend
356 356  
357 357  
358   -static struct file_operations devinfo_fops = {
  358 +static const struct file_operations devinfo_fops = {
359 359 .read = devinfo_read_file,
360 360 .write = write_file_dummy,
361 361 .open = open_file_generic,
362 362 };
363 363  
364   -static struct file_operations spromdump_fops = {
  364 +static const struct file_operations spromdump_fops = {
365 365 .read = spromdump_read_file,
366 366 .write = write_file_dummy,
367 367 .open = open_file_generic,
368 368 };
369 369  
370   -static struct file_operations drvinfo_fops = {
  370 +static const struct file_operations drvinfo_fops = {
371 371 .read = drvinfo_read_file,
372 372 .write = write_file_dummy,
373 373 .open = open_file_generic,
374 374 };
375 375  
376   -static struct file_operations tsf_fops = {
  376 +static const struct file_operations tsf_fops = {
377 377 .read = tsf_read_file,
378 378 .write = tsf_write_file,
379 379 .open = open_file_generic,
380 380 };
381 381  
382   -static struct file_operations txstat_fops = {
  382 +static const struct file_operations txstat_fops = {
383 383 .read = txstat_read_file,
384 384 .write = write_file_dummy,
385 385 .open = open_file_generic,
386 386 };
387 387  
388   -static struct file_operations restart_fops = {
  388 +static const struct file_operations restart_fops = {
389 389 .write = restart_write_file,
390 390 .open = open_file_generic,
391 391 };
drivers/net/wireless/strip.c
... ... @@ -1160,7 +1160,7 @@
1160 1160 return seq_open(file, &strip_seq_ops);
1161 1161 }
1162 1162  
1163   -static struct file_operations strip_seq_fops = {
  1163 +static const struct file_operations strip_seq_fops = {
1164 1164 .owner = THIS_MODULE,
1165 1165 .open = strip_seq_open,
1166 1166 .read = seq_read,
drivers/oprofile/event_buffer.c
... ... @@ -181,7 +181,7 @@
181 181 return retval;
182 182 }
183 183  
184   -struct file_operations event_buffer_fops = {
  184 +const struct file_operations event_buffer_fops = {
185 185 .open = event_buffer_open,
186 186 .release = event_buffer_release,
187 187 .read = event_buffer_read,
drivers/oprofile/event_buffer.h
... ... @@ -41,7 +41,7 @@
41 41 /* add data to the event buffer */
42 42 void add_event_entry(unsigned long data);
43 43  
44   -extern struct file_operations event_buffer_fops;
  44 +extern const struct file_operations event_buffer_fops;
45 45  
46 46 /* mutex between sync_cpu_buffers() and the
47 47 * file reading code.
drivers/oprofile/oprofile_files.c
... ... @@ -44,7 +44,7 @@
44 44 }
45 45  
46 46  
47   -static struct file_operations depth_fops = {
  47 +static const struct file_operations depth_fops = {
48 48 .read = depth_read,
49 49 .write = depth_write
50 50 };
... ... @@ -56,7 +56,7 @@
56 56 }
57 57  
58 58  
59   -static struct file_operations pointer_size_fops = {
  59 +static const struct file_operations pointer_size_fops = {
60 60 .read = pointer_size_read,
61 61 };
62 62  
... ... @@ -67,7 +67,7 @@
67 67 }
68 68  
69 69  
70   -static struct file_operations cpu_type_fops = {
  70 +static const struct file_operations cpu_type_fops = {
71 71 .read = cpu_type_read,
72 72 };
73 73  
... ... @@ -101,7 +101,7 @@
101 101 }
102 102  
103 103  
104   -static struct file_operations enable_fops = {
  104 +static const struct file_operations enable_fops = {
105 105 .read = enable_read,
106 106 .write = enable_write,
107 107 };
... ... @@ -114,7 +114,7 @@
114 114 }
115 115  
116 116  
117   -static struct file_operations dump_fops = {
  117 +static const struct file_operations dump_fops = {
118 118 .write = dump_write,
119 119 };
120 120  
drivers/oprofile/oprofilefs.c
... ... @@ -115,14 +115,14 @@
115 115 }
116 116  
117 117  
118   -static struct file_operations ulong_fops = {
  118 +static const struct file_operations ulong_fops = {
119 119 .read = ulong_read_file,
120 120 .write = ulong_write_file,
121 121 .open = default_open,
122 122 };
123 123  
124 124  
125   -static struct file_operations ulong_ro_fops = {
  125 +static const struct file_operations ulong_ro_fops = {
126 126 .read = ulong_read_file,
127 127 .open = default_open,
128 128 };
... ... @@ -182,7 +182,7 @@
182 182 }
183 183  
184 184  
185   -static struct file_operations atomic_ro_fops = {
  185 +static const struct file_operations atomic_ro_fops = {
186 186 .read = atomic_read_file,
187 187 .open = default_open,
188 188 };
drivers/parisc/ccio-dma.c
... ... @@ -1091,7 +1091,7 @@
1091 1091 return single_open(file, &ccio_proc_info, NULL);
1092 1092 }
1093 1093  
1094   -static struct file_operations ccio_proc_info_fops = {
  1094 +static const struct file_operations ccio_proc_info_fops = {
1095 1095 .owner = THIS_MODULE,
1096 1096 .open = ccio_proc_info_open,
1097 1097 .read = seq_read,
... ... @@ -1127,7 +1127,7 @@
1127 1127 return single_open(file, &ccio_proc_bitmap_info, NULL);
1128 1128 }
1129 1129  
1130   -static struct file_operations ccio_proc_bitmap_fops = {
  1130 +static const struct file_operations ccio_proc_bitmap_fops = {
1131 1131 .owner = THIS_MODULE,
1132 1132 .open = ccio_proc_bitmap_open,
1133 1133 .read = seq_read,
drivers/parisc/eisa_eeprom.c
... ... @@ -97,7 +97,7 @@
97 97 /*
98 98 * The various file operations we support.
99 99 */
100   -static struct file_operations eisa_eeprom_fops = {
  100 +static const struct file_operations eisa_eeprom_fops = {
101 101 .owner = THIS_MODULE,
102 102 .llseek = eisa_eeprom_llseek,
103 103 .read = eisa_eeprom_read,
drivers/parisc/sba_iommu.c
... ... @@ -1799,7 +1799,7 @@
1799 1799 return single_open(f, &sba_proc_info, NULL);
1800 1800 }
1801 1801  
1802   -static struct file_operations sba_proc_fops = {
  1802 +static const struct file_operations sba_proc_fops = {
1803 1803 .owner = THIS_MODULE,
1804 1804 .open = sba_proc_open,
1805 1805 .read = seq_read,
... ... @@ -1831,7 +1831,7 @@
1831 1831 return single_open(f, &sba_proc_bitmap_info, NULL);
1832 1832 }
1833 1833  
1834   -static struct file_operations sba_proc_bitmap_fops = {
  1834 +static const struct file_operations sba_proc_bitmap_fops = {
1835 1835 .owner = THIS_MODULE,
1836 1836 .open = sba_proc_bitmap_open,
1837 1837 .read = seq_read,
drivers/pci/hotplug/cpqphp_sysfs.c
... ... @@ -202,7 +202,7 @@
202 202 return 0;
203 203 }
204 204  
205   -static struct file_operations debug_ops = {
  205 +static const struct file_operations debug_ops = {
206 206 .owner = THIS_MODULE,
207 207 .open = open,
208 208 .llseek = lseek,
... ... @@ -287,7 +287,7 @@
287 287 }
288 288 #endif /* HAVE_PCI_MMAP */
289 289  
290   -static struct file_operations proc_bus_pci_operations = {
  290 +static const struct file_operations proc_bus_pci_operations = {
291 291 .llseek = proc_bus_pci_lseek,
292 292 .read = proc_bus_pci_read,
293 293 .write = proc_bus_pci_write,
... ... @@ -456,7 +456,7 @@
456 456 {
457 457 return seq_open(file, &proc_bus_pci_devices_op);
458 458 }
459   -static struct file_operations proc_bus_pci_dev_operations = {
  459 +static const struct file_operations proc_bus_pci_dev_operations = {
460 460 .open = proc_bus_pci_dev_open,
461 461 .read = seq_read,
462 462 .llseek = seq_lseek,
drivers/pcmcia/pcmcia_ioctl.c
... ... @@ -765,7 +765,7 @@
765 765  
766 766 /*====================================================================*/
767 767  
768   -static struct file_operations ds_fops = {
  768 +static const struct file_operations ds_fops = {
769 769 .owner = THIS_MODULE,
770 770 .open = ds_open,
771 771 .release = ds_release,
drivers/pnp/isapnp/proc.c
... ... @@ -85,7 +85,7 @@
85 85 return nbytes;
86 86 }
87 87  
88   -static struct file_operations isapnp_proc_bus_file_operations =
  88 +static const struct file_operations isapnp_proc_bus_file_operations =
89 89 {
90 90 .llseek = isapnp_proc_bus_lseek,
91 91 .read = isapnp_proc_bus_read,
drivers/rtc/rtc-dev.c
... ... @@ -384,7 +384,7 @@
384 384 return fasync_helper(fd, file, on, &rtc->async_queue);
385 385 }
386 386  
387   -static struct file_operations rtc_dev_fops = {
  387 +static const struct file_operations rtc_dev_fops = {
388 388 .owner = THIS_MODULE,
389 389 .llseek = no_llseek,
390 390 .read = rtc_dev_read,
drivers/rtc/rtc-proc.c
... ... @@ -96,7 +96,7 @@
96 96 return res;
97 97 }
98 98  
99   -static struct file_operations rtc_proc_fops = {
  99 +static const struct file_operations rtc_proc_fops = {
100 100 .open = rtc_proc_open,
101 101 .read = seq_read,
102 102 .llseek = seq_lseek,
drivers/s390/block/dasd_eer.c
... ... @@ -650,7 +650,7 @@
650 650 return mask;
651 651 }
652 652  
653   -static struct file_operations dasd_eer_fops = {
  653 +static const struct file_operations dasd_eer_fops = {
654 654 .open = &dasd_eer_open,
655 655 .release = &dasd_eer_close,
656 656 .read = &dasd_eer_read,
drivers/s390/block/dasd_proc.c
... ... @@ -147,7 +147,7 @@
147 147 return seq_open(file, &dasd_devices_seq_ops);
148 148 }
149 149  
150   -static struct file_operations dasd_devices_file_ops = {
  150 +static const struct file_operations dasd_devices_file_ops = {
151 151 .open = dasd_devices_open,
152 152 .read = seq_read,
153 153 .llseek = seq_lseek,
drivers/s390/char/fs3270.c
... ... @@ -493,7 +493,7 @@
493 493 return 0;
494 494 }
495 495  
496   -static struct file_operations fs3270_fops = {
  496 +static const struct file_operations fs3270_fops = {
497 497 .owner = THIS_MODULE, /* owner */
498 498 .read = fs3270_read, /* read */
499 499 .write = fs3270_write, /* write */
drivers/s390/char/monreader.c
... ... @@ -547,7 +547,7 @@
547 547 return 0;
548 548 }
549 549  
550   -static struct file_operations mon_fops = {
  550 +static const struct file_operations mon_fops = {
551 551 .owner = THIS_MODULE,
552 552 .open = &mon_open,
553 553 .release = &mon_close,
drivers/s390/char/monwriter.c
... ... @@ -255,7 +255,7 @@
255 255 return rc;
256 256 }
257 257  
258   -static struct file_operations monwrite_fops = {
  258 +static const struct file_operations monwrite_fops = {
259 259 .owner = THIS_MODULE,
260 260 .open = &monwrite_open,
261 261 .release = &monwrite_close,
drivers/s390/char/tape_char.c
... ... @@ -39,7 +39,7 @@
39 39 static long tapechar_compat_ioctl(struct file *, unsigned int,
40 40 unsigned long);
41 41  
42   -static struct file_operations tape_fops =
  42 +static const struct file_operations tape_fops =
43 43 {
44 44 .owner = THIS_MODULE,
45 45 .read = tapechar_read,
drivers/s390/char/tape_proc.c
... ... @@ -109,7 +109,7 @@
109 109 return seq_open(file, &tape_proc_seq);
110 110 }
111 111  
112   -static struct file_operations tape_proc_ops =
  112 +static const struct file_operations tape_proc_ops =
113 113 {
114 114 .open = tape_proc_open,
115 115 .read = seq_read,
drivers/s390/char/vmcp.c
... ... @@ -173,7 +173,7 @@
173 173 }
174 174 }
175 175  
176   -static struct file_operations vmcp_fops = {
  176 +static const struct file_operations vmcp_fops = {
177 177 .owner = THIS_MODULE,
178 178 .open = &vmcp_open,
179 179 .release = &vmcp_release,
drivers/s390/char/vmlogrdr.c
... ... @@ -88,7 +88,7 @@
88 88 static ssize_t vmlogrdr_read (struct file *filp, char __user *data,
89 89 size_t count, loff_t * ppos);
90 90  
91   -static struct file_operations vmlogrdr_fops = {
  91 +static const struct file_operations vmlogrdr_fops = {
92 92 .owner = THIS_MODULE,
93 93 .open = vmlogrdr_open,
94 94 .release = vmlogrdr_release,
drivers/s390/char/vmwatchdog.c
... ... @@ -228,7 +228,7 @@
228 228 return count;
229 229 }
230 230  
231   -static struct file_operations vmwdt_fops = {
  231 +static const struct file_operations vmwdt_fops = {
232 232 .open = &vmwdt_open,
233 233 .release = &vmwdt_close,
234 234 .ioctl = &vmwdt_ioctl,
drivers/s390/cio/blacklist.c
... ... @@ -364,7 +364,7 @@
364 364 return seq_open(file, &cio_ignore_proc_seq_ops);
365 365 }
366 366  
367   -static struct file_operations cio_ignore_proc_fops = {
  367 +static const struct file_operations cio_ignore_proc_fops = {
368 368 .open = cio_ignore_proc_open,
369 369 .read = seq_read,
370 370 .llseek = seq_lseek,
drivers/s390/crypto/zcrypt_api.c
... ... @@ -807,7 +807,7 @@
807 807 /**
808 808 * Misc device file operations.
809 809 */
810   -static struct file_operations zcrypt_fops = {
  810 +static const struct file_operations zcrypt_fops = {
811 811 .owner = THIS_MODULE,
812 812 .read = zcrypt_read,
813 813 .write = zcrypt_write,
drivers/s390/net/qeth_proc.c
... ... @@ -161,7 +161,7 @@
161 161 return seq_open(file, &qeth_procfile_seq_ops);
162 162 }
163 163  
164   -static struct file_operations qeth_procfile_fops = {
  164 +static const struct file_operations qeth_procfile_fops = {
165 165 .owner = THIS_MODULE,
166 166 .open = qeth_procfile_open,
167 167 .read = seq_read,
... ... @@ -273,7 +273,7 @@
273 273 return seq_open(file, &qeth_perf_procfile_seq_ops);
274 274 }
275 275  
276   -static struct file_operations qeth_perf_procfile_fops = {
  276 +static const struct file_operations qeth_perf_procfile_fops = {
277 277 .owner = THIS_MODULE,
278 278 .open = qeth_perf_procfile_open,
279 279 .read = seq_read,
drivers/s390/scsi/zfcp_aux.c
... ... @@ -60,7 +60,7 @@
60 60 _IOWR(ZFCP_CFDC_IOC_MAGIC, 0, struct zfcp_cfdc_sense_data)
61 61  
62 62  
63   -static struct file_operations zfcp_cfdc_fops = {
  63 +static const struct file_operations zfcp_cfdc_fops = {
64 64 .unlocked_ioctl = zfcp_cfdc_dev_ioctl,
65 65 #ifdef CONFIG_COMPAT
66 66 .compat_ioctl = zfcp_cfdc_dev_ioctl