aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/i2o
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:34 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commitd54b1fdb1d9f82e375a299e22bd366aad52d4c34 (patch)
treef94768d59702dbbc0beb9a70d9be65dbc5e5108d /drivers/message/i2o
parentfa027c2a0a0d6d1df6b29ee99048502c93da0dd4 (diff)
[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>
Diffstat (limited to 'drivers/message/i2o')
-rw-r--r--drivers/message/i2o/i2o_config.c2
-rw-r--r--drivers/message/i2o/i2o_proc.c38
2 files changed, 20 insertions, 20 deletions
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index e33d446e7493..8ba275a12773 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -1111,7 +1111,7 @@ static int cfg_release(struct inode *inode, struct file *file)
1111 return 0; 1111 return 0;
1112} 1112}
1113 1113
1114static struct file_operations config_fops = { 1114static const struct file_operations config_fops = {
1115 .owner = THIS_MODULE, 1115 .owner = THIS_MODULE,
1116 .llseek = no_llseek, 1116 .llseek = no_llseek,
1117 .ioctl = i2o_cfg_ioctl, 1117 .ioctl = i2o_cfg_ioctl,
diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
index a61cb17c5c12..06892ac2286e 100644
--- a/drivers/message/i2o/i2o_proc.c
+++ b/drivers/message/i2o/i2o_proc.c
@@ -1703,133 +1703,133 @@ static int i2o_seq_open_dev_name(struct inode *inode, struct file *file)
1703 return single_open(file, i2o_seq_show_dev_name, PDE(inode)->data); 1703 return single_open(file, i2o_seq_show_dev_name, PDE(inode)->data);
1704}; 1704};
1705 1705
1706static struct file_operations i2o_seq_fops_lct = { 1706static const struct file_operations i2o_seq_fops_lct = {
1707 .open = i2o_seq_open_lct, 1707 .open = i2o_seq_open_lct,
1708 .read = seq_read, 1708 .read = seq_read,
1709 .llseek = seq_lseek, 1709 .llseek = seq_lseek,
1710 .release = single_release, 1710 .release = single_release,
1711}; 1711};
1712 1712
1713static struct file_operations i2o_seq_fops_hrt = { 1713static const struct file_operations i2o_seq_fops_hrt = {
1714 .open = i2o_seq_open_hrt, 1714 .open = i2o_seq_open_hrt,
1715 .read = seq_read, 1715 .read = seq_read,
1716 .llseek = seq_lseek, 1716 .llseek = seq_lseek,
1717 .release = single_release, 1717 .release = single_release,
1718}; 1718};
1719 1719
1720static struct file_operations i2o_seq_fops_status = { 1720static const struct file_operations i2o_seq_fops_status = {
1721 .open = i2o_seq_open_status, 1721 .open = i2o_seq_open_status,
1722 .read = seq_read, 1722 .read = seq_read,
1723 .llseek = seq_lseek, 1723 .llseek = seq_lseek,
1724 .release = single_release, 1724 .release = single_release,
1725}; 1725};
1726 1726
1727static struct file_operations i2o_seq_fops_hw = { 1727static const struct file_operations i2o_seq_fops_hw = {
1728 .open = i2o_seq_open_hw, 1728 .open = i2o_seq_open_hw,
1729 .read = seq_read, 1729 .read = seq_read,
1730 .llseek = seq_lseek, 1730 .llseek = seq_lseek,
1731 .release = single_release, 1731 .release = single_release,
1732}; 1732};
1733 1733
1734static struct file_operations i2o_seq_fops_ddm_table = { 1734static const struct file_operations i2o_seq_fops_ddm_table = {
1735 .open = i2o_seq_open_ddm_table, 1735 .open = i2o_seq_open_ddm_table,
1736 .read = seq_read, 1736 .read = seq_read,
1737 .llseek = seq_lseek, 1737 .llseek = seq_lseek,
1738 .release = single_release, 1738 .release = single_release,
1739}; 1739};
1740 1740
1741static struct file_operations i2o_seq_fops_driver_store = { 1741static const struct file_operations i2o_seq_fops_driver_store = {
1742 .open = i2o_seq_open_driver_store, 1742 .open = i2o_seq_open_driver_store,
1743 .read = seq_read, 1743 .read = seq_read,
1744 .llseek = seq_lseek, 1744 .llseek = seq_lseek,
1745 .release = single_release, 1745 .release = single_release,
1746}; 1746};
1747 1747
1748static struct file_operations i2o_seq_fops_drivers_stored = { 1748static const struct file_operations i2o_seq_fops_drivers_stored = {
1749 .open = i2o_seq_open_drivers_stored, 1749 .open = i2o_seq_open_drivers_stored,
1750 .read = seq_read, 1750 .read = seq_read,
1751 .llseek = seq_lseek, 1751 .llseek = seq_lseek,
1752 .release = single_release, 1752 .release = single_release,
1753}; 1753};
1754 1754
1755static struct file_operations i2o_seq_fops_groups = { 1755static const struct file_operations i2o_seq_fops_groups = {
1756 .open = i2o_seq_open_groups, 1756 .open = i2o_seq_open_groups,
1757 .read = seq_read, 1757 .read = seq_read,
1758 .llseek = seq_lseek, 1758 .llseek = seq_lseek,
1759 .release = single_release, 1759 .release = single_release,
1760}; 1760};
1761 1761
1762static struct file_operations i2o_seq_fops_phys_device = { 1762static const struct file_operations i2o_seq_fops_phys_device = {
1763 .open = i2o_seq_open_phys_device, 1763 .open = i2o_seq_open_phys_device,
1764 .read = seq_read, 1764 .read = seq_read,
1765 .llseek = seq_lseek, 1765 .llseek = seq_lseek,
1766 .release = single_release, 1766 .release = single_release,
1767}; 1767};
1768 1768
1769static struct file_operations i2o_seq_fops_claimed = { 1769static const struct file_operations i2o_seq_fops_claimed = {
1770 .open = i2o_seq_open_claimed, 1770 .open = i2o_seq_open_claimed,
1771 .read = seq_read, 1771 .read = seq_read,
1772 .llseek = seq_lseek, 1772 .llseek = seq_lseek,
1773 .release = single_release, 1773 .release = single_release,
1774}; 1774};
1775 1775
1776static struct file_operations i2o_seq_fops_users = { 1776static const struct file_operations i2o_seq_fops_users = {
1777 .open = i2o_seq_open_users, 1777 .open = i2o_seq_open_users,
1778 .read = seq_read, 1778 .read = seq_read,
1779 .llseek = seq_lseek, 1779 .llseek = seq_lseek,
1780 .release = single_release, 1780 .release = single_release,
1781}; 1781};
1782 1782
1783static struct file_operations i2o_seq_fops_priv_msgs = { 1783static const struct file_operations i2o_seq_fops_priv_msgs = {
1784 .open = i2o_seq_open_priv_msgs, 1784 .open = i2o_seq_open_priv_msgs,
1785 .read = seq_read, 1785 .read = seq_read,
1786 .llseek = seq_lseek, 1786 .llseek = seq_lseek,
1787 .release = single_release, 1787 .release = single_release,
1788}; 1788};
1789 1789
1790static struct file_operations i2o_seq_fops_authorized_users = { 1790static const struct file_operations i2o_seq_fops_authorized_users = {
1791 .open = i2o_seq_open_authorized_users, 1791 .open = i2o_seq_open_authorized_users,
1792 .read = seq_read, 1792 .read = seq_read,
1793 .llseek = seq_lseek, 1793 .llseek = seq_lseek,
1794 .release = single_release, 1794 .release = single_release,
1795}; 1795};
1796 1796
1797static struct file_operations i2o_seq_fops_dev_name = { 1797static const struct file_operations i2o_seq_fops_dev_name = {
1798 .open = i2o_seq_open_dev_name, 1798 .open = i2o_seq_open_dev_name,
1799 .read = seq_read, 1799 .read = seq_read,
1800 .llseek = seq_lseek, 1800 .llseek = seq_lseek,
1801 .release = single_release, 1801 .release = single_release,
1802}; 1802};
1803 1803
1804static struct file_operations i2o_seq_fops_dev_identity = { 1804static const struct file_operations i2o_seq_fops_dev_identity = {
1805 .open = i2o_seq_open_dev_identity, 1805 .open = i2o_seq_open_dev_identity,
1806 .read = seq_read, 1806 .read = seq_read,
1807 .llseek = seq_lseek, 1807 .llseek = seq_lseek,
1808 .release = single_release, 1808 .release = single_release,
1809}; 1809};
1810 1810
1811static struct file_operations i2o_seq_fops_ddm_identity = { 1811static const struct file_operations i2o_seq_fops_ddm_identity = {
1812 .open = i2o_seq_open_ddm_identity, 1812 .open = i2o_seq_open_ddm_identity,
1813 .read = seq_read, 1813 .read = seq_read,
1814 .llseek = seq_lseek, 1814 .llseek = seq_lseek,
1815 .release = single_release, 1815 .release = single_release,
1816}; 1816};
1817 1817
1818static struct file_operations i2o_seq_fops_uinfo = { 1818static const struct file_operations i2o_seq_fops_uinfo = {
1819 .open = i2o_seq_open_uinfo, 1819 .open = i2o_seq_open_uinfo,
1820 .read = seq_read, 1820 .read = seq_read,
1821 .llseek = seq_lseek, 1821 .llseek = seq_lseek,
1822 .release = single_release, 1822 .release = single_release,
1823}; 1823};
1824 1824
1825static struct file_operations i2o_seq_fops_sgl_limits = { 1825static const struct file_operations i2o_seq_fops_sgl_limits = {
1826 .open = i2o_seq_open_sgl_limits, 1826 .open = i2o_seq_open_sgl_limits,
1827 .read = seq_read, 1827 .read = seq_read,
1828 .llseek = seq_lseek, 1828 .llseek = seq_lseek,
1829 .release = single_release, 1829 .release = single_release,
1830}; 1830};
1831 1831
1832static struct file_operations i2o_seq_fops_sensors = { 1832static const struct file_operations i2o_seq_fops_sensors = {
1833 .open = i2o_seq_open_sensors, 1833 .open = i2o_seq_open_sensors,
1834 .read = seq_read, 1834 .read = seq_read,
1835 .llseek = seq_lseek, 1835 .llseek = seq_lseek,