Commit 5ca1b998d33c39819fca2b675d80c4469e705f2d
Committed by
David S. Miller
1 parent
3b401a81c0
Exists in
master
and in
39 other branches
net: file_operations should be const
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>
Showing 7 changed files with 14 additions and 14 deletions Side-by-side Diff
net/ipv6/ip6mr.c
... | ... | @@ -217,7 +217,7 @@ |
217 | 217 | sizeof(struct ipmr_vif_iter)); |
218 | 218 | } |
219 | 219 | |
220 | -static struct file_operations ip6mr_vif_fops = { | |
220 | +static const struct file_operations ip6mr_vif_fops = { | |
221 | 221 | .owner = THIS_MODULE, |
222 | 222 | .open = ip6mr_vif_open, |
223 | 223 | .read = seq_read, |
... | ... | @@ -341,7 +341,7 @@ |
341 | 341 | sizeof(struct ipmr_mfc_iter)); |
342 | 342 | } |
343 | 343 | |
344 | -static struct file_operations ip6mr_mfc_fops = { | |
344 | +static const struct file_operations ip6mr_mfc_fops = { | |
345 | 345 | .owner = THIS_MODULE, |
346 | 346 | .open = ipmr_mfc_open, |
347 | 347 | .read = seq_read, |
net/irda/irnet/irnet_ppp.h
... | ... | @@ -95,7 +95,7 @@ |
95 | 95 | /**************************** VARIABLES ****************************/ |
96 | 96 | |
97 | 97 | /* Filesystem callbacks (to call us) */ |
98 | -static struct file_operations irnet_device_fops = | |
98 | +static const struct file_operations irnet_device_fops = | |
99 | 99 | { |
100 | 100 | .owner = THIS_MODULE, |
101 | 101 | .read = dev_irnet_read, |
net/irda/irproc.c
... | ... | @@ -34,21 +34,21 @@ |
34 | 34 | #include <net/irda/irlap.h> |
35 | 35 | #include <net/irda/irlmp.h> |
36 | 36 | |
37 | -extern struct file_operations discovery_seq_fops; | |
38 | -extern struct file_operations irlap_seq_fops; | |
39 | -extern struct file_operations irlmp_seq_fops; | |
40 | -extern struct file_operations irttp_seq_fops; | |
41 | -extern struct file_operations irias_seq_fops; | |
37 | +extern const struct file_operations discovery_seq_fops; | |
38 | +extern const struct file_operations irlap_seq_fops; | |
39 | +extern const struct file_operations irlmp_seq_fops; | |
40 | +extern const struct file_operations irttp_seq_fops; | |
41 | +extern const struct file_operations irias_seq_fops; | |
42 | 42 | |
43 | 43 | struct irda_entry { |
44 | 44 | const char *name; |
45 | - struct file_operations *fops; | |
45 | + const struct file_operations *fops; | |
46 | 46 | }; |
47 | 47 | |
48 | 48 | struct proc_dir_entry *proc_irda; |
49 | 49 | EXPORT_SYMBOL(proc_irda); |
50 | 50 | |
51 | -static struct irda_entry irda_dirs[] = { | |
51 | +static const struct irda_entry irda_dirs[] = { | |
52 | 52 | {"discovery", &discovery_seq_fops}, |
53 | 53 | {"irttp", &irttp_seq_fops}, |
54 | 54 | {"irlmp", &irlmp_seq_fops}, |
net/key/af_key.c
... | ... | @@ -3718,7 +3718,7 @@ |
3718 | 3718 | sizeof(struct seq_net_private)); |
3719 | 3719 | } |
3720 | 3720 | |
3721 | -static struct file_operations pfkey_proc_ops = { | |
3721 | +static const struct file_operations pfkey_proc_ops = { | |
3722 | 3722 | .open = pfkey_seq_open, |
3723 | 3723 | .read = seq_read, |
3724 | 3724 | .llseek = seq_lseek, |
net/mac80211/rc80211_minstrel_debugfs.c
net/mac80211/rc80211_pid_debugfs.c
... | ... | @@ -198,7 +198,7 @@ |
198 | 198 | |
199 | 199 | #undef RC_PID_PRINT_BUF_SIZE |
200 | 200 | |
201 | -static struct file_operations rc_pid_fop_events = { | |
201 | +static const struct file_operations rc_pid_fop_events = { | |
202 | 202 | .owner = THIS_MODULE, |
203 | 203 | .read = rate_control_pid_events_read, |
204 | 204 | .poll = rate_control_pid_events_poll, |
net/xfrm/xfrm_proc.c
... | ... | @@ -60,7 +60,7 @@ |
60 | 60 | return single_open_net(inode, file, xfrm_statistics_seq_show); |
61 | 61 | } |
62 | 62 | |
63 | -static struct file_operations xfrm_statistics_seq_fops = { | |
63 | +static const struct file_operations xfrm_statistics_seq_fops = { | |
64 | 64 | .owner = THIS_MODULE, |
65 | 65 | .open = xfrm_statistics_seq_open, |
66 | 66 | .read = seq_read, |