aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2011-10-30 02:46:30 -0400
committerDavid S. Miller <davem@davemloft.net>2011-11-01 17:56:14 -0400
commit73cb88ecb950ee67906d02354f781ea293bcf895 (patch)
treefbb4a777410d5a5653537bcd3ee7e954bc9ba5a0 /include/net/tcp.h
parent98f41f694f46085fda475cdee8cc0b6d2c5e6f1f (diff)
net: make the tcp and udp file_operations for the /proc stuff const
the tcp and udp code creates a set of struct file_operations at runtime while it can also be done at compile time, with the added benefit of then having these file operations be const. the trickiest part was to get the "THIS_MODULE" reference right; the naive method of declaring a struct in the place of registration would not work for this reason. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index e147f42d643d..bb18c4d69aba 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1403,11 +1403,13 @@ enum tcp_seq_states {
1403 TCP_SEQ_STATE_TIME_WAIT, 1403 TCP_SEQ_STATE_TIME_WAIT,
1404}; 1404};
1405 1405
1406int tcp_seq_open(struct inode *inode, struct file *file);
1407
1406struct tcp_seq_afinfo { 1408struct tcp_seq_afinfo {
1407 char *name; 1409 char *name;
1408 sa_family_t family; 1410 sa_family_t family;
1409 struct file_operations seq_fops; 1411 const struct file_operations *seq_fops;
1410 struct seq_operations seq_ops; 1412 struct seq_operations seq_ops;
1411}; 1413};
1412 1414
1413struct tcp_iter_state { 1415struct tcp_iter_state {