Commit 5ca1b998 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

net: file_operations should be const

All instances of file_operations should be const.
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b401a81
...@@ -217,7 +217,7 @@ static int ip6mr_vif_open(struct inode *inode, struct file *file) ...@@ -217,7 +217,7 @@ static int ip6mr_vif_open(struct inode *inode, struct file *file)
sizeof(struct ipmr_vif_iter)); sizeof(struct ipmr_vif_iter));
} }
static struct file_operations ip6mr_vif_fops = { static const struct file_operations ip6mr_vif_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = ip6mr_vif_open, .open = ip6mr_vif_open,
.read = seq_read, .read = seq_read,
...@@ -341,7 +341,7 @@ static int ipmr_mfc_open(struct inode *inode, struct file *file) ...@@ -341,7 +341,7 @@ static int ipmr_mfc_open(struct inode *inode, struct file *file)
sizeof(struct ipmr_mfc_iter)); sizeof(struct ipmr_mfc_iter));
} }
static struct file_operations ip6mr_mfc_fops = { static const struct file_operations ip6mr_mfc_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = ipmr_mfc_open, .open = ipmr_mfc_open,
.read = seq_read, .read = seq_read,
......
...@@ -95,7 +95,7 @@ static int ...@@ -95,7 +95,7 @@ static int
/**************************** VARIABLES ****************************/ /**************************** VARIABLES ****************************/
/* Filesystem callbacks (to call us) */ /* Filesystem callbacks (to call us) */
static struct file_operations irnet_device_fops = static const struct file_operations irnet_device_fops =
{ {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = dev_irnet_read, .read = dev_irnet_read,
......
...@@ -34,21 +34,21 @@ ...@@ -34,21 +34,21 @@
#include <net/irda/irlap.h> #include <net/irda/irlap.h>
#include <net/irda/irlmp.h> #include <net/irda/irlmp.h>
extern struct file_operations discovery_seq_fops; extern const struct file_operations discovery_seq_fops;
extern struct file_operations irlap_seq_fops; extern const struct file_operations irlap_seq_fops;
extern struct file_operations irlmp_seq_fops; extern const struct file_operations irlmp_seq_fops;
extern struct file_operations irttp_seq_fops; extern const struct file_operations irttp_seq_fops;
extern struct file_operations irias_seq_fops; extern const struct file_operations irias_seq_fops;
struct irda_entry { struct irda_entry {
const char *name; const char *name;
struct file_operations *fops; const struct file_operations *fops;
}; };
struct proc_dir_entry *proc_irda; struct proc_dir_entry *proc_irda;
EXPORT_SYMBOL(proc_irda); EXPORT_SYMBOL(proc_irda);
static struct irda_entry irda_dirs[] = { static const struct irda_entry irda_dirs[] = {
{"discovery", &discovery_seq_fops}, {"discovery", &discovery_seq_fops},
{"irttp", &irttp_seq_fops}, {"irttp", &irttp_seq_fops},
{"irlmp", &irlmp_seq_fops}, {"irlmp", &irlmp_seq_fops},
......
...@@ -3718,7 +3718,7 @@ static int pfkey_seq_open(struct inode *inode, struct file *file) ...@@ -3718,7 +3718,7 @@ static int pfkey_seq_open(struct inode *inode, struct file *file)
sizeof(struct seq_net_private)); sizeof(struct seq_net_private));
} }
static struct file_operations pfkey_proc_ops = { static const struct file_operations pfkey_proc_ops = {
.open = pfkey_seq_open, .open = pfkey_seq_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
......
...@@ -139,7 +139,7 @@ minstrel_stats_release(struct inode *inode, struct file *file) ...@@ -139,7 +139,7 @@ minstrel_stats_release(struct inode *inode, struct file *file)
return 0; return 0;
} }
static struct file_operations minstrel_stat_fops = { static const struct file_operations minstrel_stat_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = minstrel_stats_open, .open = minstrel_stats_open,
.read = minstrel_stats_read, .read = minstrel_stats_read,
......
...@@ -198,7 +198,7 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf, ...@@ -198,7 +198,7 @@ static ssize_t rate_control_pid_events_read(struct file *file, char __user *buf,
#undef RC_PID_PRINT_BUF_SIZE #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, .owner = THIS_MODULE,
.read = rate_control_pid_events_read, .read = rate_control_pid_events_read,
.poll = rate_control_pid_events_poll, .poll = rate_control_pid_events_poll,
......
...@@ -60,7 +60,7 @@ static int xfrm_statistics_seq_open(struct inode *inode, struct file *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); 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, .owner = THIS_MODULE,
.open = xfrm_statistics_seq_open, .open = xfrm_statistics_seq_open,
.read = seq_read, .read = seq_read,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment