net: file_operations should be const
authorStephen Hemminger <shemminger@vyatta.com>
Tue, 1 Sep 2009 19:25:05 +0000 (19:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Sep 2009 08:03:53 +0000 (01:03 -0700)
All instances of file_operations should be const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6mr.c
net/irda/irnet/irnet_ppp.h
net/irda/irproc.c
net/key/af_key.c
net/mac80211/rc80211_minstrel_debugfs.c
net/mac80211/rc80211_pid_debugfs.c
net/xfrm/xfrm_proc.c

index d2df837892d259d880ccc35af07507e3a3f385aa..5c8d73730c75d68dcdb050a5607fa073e1e7e40b 100644 (file)
@@ -217,7 +217,7 @@ static int ip6mr_vif_open(struct inode *inode, struct file *file)
                            sizeof(struct ipmr_vif_iter));
 }
 
-static struct file_operations ip6mr_vif_fops = {
+static const struct file_operations ip6mr_vif_fops = {
        .owner   = THIS_MODULE,
        .open    = ip6mr_vif_open,
        .read    = seq_read,
@@ -341,7 +341,7 @@ static int ipmr_mfc_open(struct inode *inode, struct file *file)
                            sizeof(struct ipmr_mfc_iter));
 }
 
-static struct file_operations ip6mr_mfc_fops = {
+static const struct file_operations ip6mr_mfc_fops = {
        .owner   = THIS_MODULE,
        .open    = ipmr_mfc_open,
        .read    = seq_read,
index d9f8bd4ebd05fcfb5040f527c5d8cb7eee5ac738..b5df2418f90c42b3ced4c1917ccf1e71b45c55f1 100644 (file)
@@ -95,7 +95,7 @@ static int
 /**************************** VARIABLES ****************************/
 
 /* Filesystem callbacks (to call us) */
-static struct file_operations irnet_device_fops =
+static const struct file_operations irnet_device_fops =
 {
        .owner          = THIS_MODULE,
        .read           = dev_irnet_read,
index 8ff1861649e87716d8ecf826c8682182a825a88b..318766e5dbdf906f441448b2d46c1b8a38aacadc 100644 (file)
 #include <net/irda/irlap.h>
 #include <net/irda/irlmp.h>
 
-extern struct file_operations discovery_seq_fops;
-extern struct file_operations irlap_seq_fops;
-extern struct file_operations irlmp_seq_fops;
-extern struct file_operations irttp_seq_fops;
-extern struct file_operations irias_seq_fops;
+extern const struct file_operations discovery_seq_fops;
+extern const struct file_operations irlap_seq_fops;
+extern const struct file_operations irlmp_seq_fops;
+extern const struct file_operations irttp_seq_fops;
+extern const struct file_operations irias_seq_fops;
 
 struct irda_entry {
        const char *name;
-       struct file_operations *fops;
+       const struct file_operations *fops;
 };
 
 struct proc_dir_entry *proc_irda;
 EXPORT_SYMBOL(proc_irda);
 
-static struct irda_entry irda_dirs[] = {
+static const struct irda_entry irda_dirs[] = {
        {"discovery",   &discovery_seq_fops},
        {"irttp",       &irttp_seq_fops},
        {"irlmp",       &irlmp_seq_fops},
index 7b1e99b5b4d27eee3863be4ec0e889f315b0ac62..4e98193dfa0fcd05532a18c7b8ff3a0e832ace5e 100644 (file)
@@ -3718,7 +3718,7 @@ static int pfkey_seq_open(struct inode *inode, struct file *file)
                            sizeof(struct seq_net_private));
 }
 
-static struct file_operations pfkey_proc_ops = {
+static const struct file_operations pfkey_proc_ops = {
        .open    = pfkey_seq_open,
        .read    = seq_read,
        .llseek  = seq_lseek,
index 3d72ec5730d4482a183b9844d23be10e314f2cd0..a715d9454f640846ccb24cc055d89eb448267840 100644 (file)
@@ -139,7 +139,7 @@ minstrel_stats_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-static struct file_operations minstrel_stat_fops = {
+static const struct file_operations minstrel_stat_fops = {
        .owner = THIS_MODULE,
        .open = minstrel_stats_open,
        .read = minstrel_stats_read,
index a08a9b5303474bc304b9f119b31cc4938dfa9acb..a59043fbb0ff267e703e1f5779d8ae45730032cc 100644 (file)
@@ -198,7 +198,7 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf,
 
 #undef RC_PID_PRINT_BUF_SIZE
 
-static struct file_operations rc_pid_fop_events = {
+static const struct file_operations rc_pid_fop_events = {
        .owner = THIS_MODULE,
        .read = rate_control_pid_events_read,
        .poll = rate_control_pid_events_poll,
index a2adb51849a96c44940303af878bf6a1316b716a..fef8db553e8d63b3f0859459f59d0c4103663ad3 100644 (file)
@@ -60,7 +60,7 @@ static int xfrm_statistics_seq_open(struct inode *inode, struct file *file)
        return single_open_net(inode, file, xfrm_statistics_seq_show);
 }
 
-static struct file_operations xfrm_statistics_seq_fops = {
+static const struct file_operations xfrm_statistics_seq_fops = {
        .owner   = THIS_MODULE,
        .open    = xfrm_statistics_seq_open,
        .read    = seq_read,