aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/net.h4
-rw-r--r--include/net/inet_common.h4
-rw-r--r--include/net/ipv6.h4
-rw-r--r--include/net/protocol.h2
-rw-r--r--net/appletalk/ddp.c4
-rw-r--r--net/atm/pvc.c2
-rw-r--r--net/atm/svc.c2
-rw-r--r--net/ax25/af_ax25.c4
-rw-r--r--net/bluetooth/bnep/sock.c2
-rw-r--r--net/bluetooth/cmtp/sock.c2
-rw-r--r--net/bluetooth/hci_sock.c2
-rw-r--r--net/bluetooth/hidp/sock.c2
-rw-r--r--net/bluetooth/l2cap.c4
-rw-r--r--net/bluetooth/rfcomm/sock.c4
-rw-r--r--net/bluetooth/sco.c4
-rw-r--r--net/dccp/proto.c2
-rw-r--r--net/decnet/af_decnet.c4
-rw-r--r--net/econet/af_econet.c4
-rw-r--r--net/ipv4/af_inet.c6
-rw-r--r--net/ipv6/af_inet6.c6
-rw-r--r--net/ipx/af_ipx.c4
-rw-r--r--net/irda/af_irda.c16
-rw-r--r--net/key/af_key.c4
-rw-r--r--net/llc/af_llc.c4
-rw-r--r--net/netlink/af_netlink.c4
-rw-r--r--net/netrom/af_netrom.c4
-rw-r--r--net/packet/af_packet.c8
-rw-r--r--net/sctp/ipv6.c2
-rw-r--r--net/sctp/protocol.c2
-rw-r--r--net/sunrpc/svcsock.c2
-rw-r--r--net/unix/af_unix.c6
-rw-r--r--net/wanrouter/af_wanpipe.c4
-rw-r--r--net/x25/af_x25.c4
33 files changed, 66 insertions, 66 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index d6a41e6577f6..28195a2d8ff0 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -107,7 +107,7 @@ enum sock_type {
107struct socket { 107struct socket {
108 socket_state state; 108 socket_state state;
109 unsigned long flags; 109 unsigned long flags;
110 struct proto_ops *ops; 110 const struct proto_ops *ops;
111 struct fasync_struct *fasync_list; 111 struct fasync_struct *fasync_list;
112 struct file *file; 112 struct file *file;
113 struct sock *sk; 113 struct sock *sk;
@@ -260,7 +260,7 @@ SOCKCALL_WRAP(name, recvmsg, (struct kiocb *iocb, struct socket *sock, struct ms
260SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_area_struct *vma), \ 260SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_area_struct *vma), \
261 (file, sock, vma)) \ 261 (file, sock, vma)) \
262 \ 262 \
263static struct proto_ops name##_ops = { \ 263static const struct proto_ops name##_ops = { \
264 .family = fam, \ 264 .family = fam, \
265 .owner = THIS_MODULE, \ 265 .owner = THIS_MODULE, \
266 .release = __lock_##name##_release, \ 266 .release = __lock_##name##_release, \
diff --git a/include/net/inet_common.h b/include/net/inet_common.h
index f943306ce5ff..227adcbdfec8 100644
--- a/include/net/inet_common.h
+++ b/include/net/inet_common.h
@@ -1,8 +1,8 @@
1#ifndef _INET_COMMON_H 1#ifndef _INET_COMMON_H
2#define _INET_COMMON_H 2#define _INET_COMMON_H
3 3
4extern struct proto_ops inet_stream_ops; 4extern const struct proto_ops inet_stream_ops;
5extern struct proto_ops inet_dgram_ops; 5extern const struct proto_ops inet_dgram_ops;
6 6
7/* 7/*
8 * INET4 prototypes used by INET6 8 * INET4 prototypes used by INET6
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index e3d5d7bc8837..11a725662c36 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -538,8 +538,8 @@ extern int sysctl_ip6frag_low_thresh;
538extern int sysctl_ip6frag_time; 538extern int sysctl_ip6frag_time;
539extern int sysctl_ip6frag_secret_interval; 539extern int sysctl_ip6frag_secret_interval;
540 540
541extern struct proto_ops inet6_stream_ops; 541extern const struct proto_ops inet6_stream_ops;
542extern struct proto_ops inet6_dgram_ops; 542extern const struct proto_ops inet6_dgram_ops;
543 543
544extern int ip6_mc_source(int add, int omode, struct sock *sk, 544extern int ip6_mc_source(int add, int omode, struct sock *sk,
545 struct group_source_req *pgsr); 545 struct group_source_req *pgsr);
diff --git a/include/net/protocol.h b/include/net/protocol.h
index a29cb29647d0..63f7db99c2a6 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -65,7 +65,7 @@ struct inet_protosw {
65 int protocol; /* This is the L4 protocol number. */ 65 int protocol; /* This is the L4 protocol number. */
66 66
67 struct proto *prot; 67 struct proto *prot;
68 struct proto_ops *ops; 68 const struct proto_ops *ops;
69 69
70 int capability; /* Which (if any) capability do 70 int capability; /* Which (if any) capability do
71 * we need to use this socket 71 * we need to use this socket
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 7982656b9c83..296f186802ff 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -63,7 +63,7 @@
63#include <linux/atalk.h> 63#include <linux/atalk.h>
64 64
65struct datalink_proto *ddp_dl, *aarp_dl; 65struct datalink_proto *ddp_dl, *aarp_dl;
66static struct proto_ops atalk_dgram_ops; 66static const struct proto_ops atalk_dgram_ops;
67 67
68/**************************************************************************\ 68/**************************************************************************\
69* * 69* *
@@ -1841,7 +1841,7 @@ static struct net_proto_family atalk_family_ops = {
1841 .owner = THIS_MODULE, 1841 .owner = THIS_MODULE,
1842}; 1842};
1843 1843
1844static struct proto_ops SOCKOPS_WRAPPED(atalk_dgram_ops) = { 1844static const struct proto_ops SOCKOPS_WRAPPED(atalk_dgram_ops) = {
1845 .family = PF_APPLETALK, 1845 .family = PF_APPLETALK,
1846 .owner = THIS_MODULE, 1846 .owner = THIS_MODULE,
1847 .release = atalk_release, 1847 .release = atalk_release,
diff --git a/net/atm/pvc.c b/net/atm/pvc.c
index 2684a92da22b..f2c541774dcd 100644
--- a/net/atm/pvc.c
+++ b/net/atm/pvc.c
@@ -102,7 +102,7 @@ static int pvc_getname(struct socket *sock,struct sockaddr *sockaddr,
102} 102}
103 103
104 104
105static struct proto_ops pvc_proto_ops = { 105static const struct proto_ops pvc_proto_ops = {
106 .family = PF_ATMPVC, 106 .family = PF_ATMPVC,
107 .owner = THIS_MODULE, 107 .owner = THIS_MODULE,
108 108
diff --git a/net/atm/svc.c b/net/atm/svc.c
index d7b266136bf6..3a180cfd7b48 100644
--- a/net/atm/svc.c
+++ b/net/atm/svc.c
@@ -613,7 +613,7 @@ static int svc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
613 return error; 613 return error;
614} 614}
615 615
616static struct proto_ops svc_proto_ops = { 616static const struct proto_ops svc_proto_ops = {
617 .family = PF_ATMSVC, 617 .family = PF_ATMSVC,
618 .owner = THIS_MODULE, 618 .owner = THIS_MODULE,
619 619
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 1b683f302657..8b5d10aaba05 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -54,7 +54,7 @@
54HLIST_HEAD(ax25_list); 54HLIST_HEAD(ax25_list);
55DEFINE_SPINLOCK(ax25_list_lock); 55DEFINE_SPINLOCK(ax25_list_lock);
56 56
57static struct proto_ops ax25_proto_ops; 57static const struct proto_ops ax25_proto_ops;
58 58
59static void ax25_free_sock(struct sock *sk) 59static void ax25_free_sock(struct sock *sk)
60{ 60{
@@ -1944,7 +1944,7 @@ static struct net_proto_family ax25_family_ops = {
1944 .owner = THIS_MODULE, 1944 .owner = THIS_MODULE,
1945}; 1945};
1946 1946
1947static struct proto_ops ax25_proto_ops = { 1947static const struct proto_ops ax25_proto_ops = {
1948 .family = PF_AX25, 1948 .family = PF_AX25,
1949 .owner = THIS_MODULE, 1949 .owner = THIS_MODULE,
1950 .release = ax25_release, 1950 .release = ax25_release,
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c
index 9778c6acd53b..ccbaf69afc5b 100644
--- a/net/bluetooth/bnep/sock.c
+++ b/net/bluetooth/bnep/sock.c
@@ -146,7 +146,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
146 return 0; 146 return 0;
147} 147}
148 148
149static struct proto_ops bnep_sock_ops = { 149static const struct proto_ops bnep_sock_ops = {
150 .family = PF_BLUETOOTH, 150 .family = PF_BLUETOOTH,
151 .owner = THIS_MODULE, 151 .owner = THIS_MODULE,
152 .release = bnep_sock_release, 152 .release = bnep_sock_release,
diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c
index beb045bf5714..5e22343b6090 100644
--- a/net/bluetooth/cmtp/sock.c
+++ b/net/bluetooth/cmtp/sock.c
@@ -137,7 +137,7 @@ static int cmtp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
137 return -EINVAL; 137 return -EINVAL;
138} 138}
139 139
140static struct proto_ops cmtp_sock_ops = { 140static const struct proto_ops cmtp_sock_ops = {
141 .family = PF_BLUETOOTH, 141 .family = PF_BLUETOOTH,
142 .owner = THIS_MODULE, 142 .owner = THIS_MODULE,
143 .release = cmtp_sock_release, 143 .release = cmtp_sock_release,
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 1d6d0a15c099..84e6c93a044a 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -575,7 +575,7 @@ static int hci_sock_getsockopt(struct socket *sock, int level, int optname, char
575 return 0; 575 return 0;
576} 576}
577 577
578static struct proto_ops hci_sock_ops = { 578static const struct proto_ops hci_sock_ops = {
579 .family = PF_BLUETOOTH, 579 .family = PF_BLUETOOTH,
580 .owner = THIS_MODULE, 580 .owner = THIS_MODULE,
581 .release = hci_sock_release, 581 .release = hci_sock_release,
diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c
index f8986f881431..8f8dd931b294 100644
--- a/net/bluetooth/hidp/sock.c
+++ b/net/bluetooth/hidp/sock.c
@@ -143,7 +143,7 @@ static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
143 return -EINVAL; 143 return -EINVAL;
144} 144}
145 145
146static struct proto_ops hidp_sock_ops = { 146static const struct proto_ops hidp_sock_ops = {
147 .family = PF_BLUETOOTH, 147 .family = PF_BLUETOOTH,
148 .owner = THIS_MODULE, 148 .owner = THIS_MODULE,
149 .release = hidp_sock_release, 149 .release = hidp_sock_release,
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 95f33cc7a24e..7f0781e4326f 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -57,7 +57,7 @@
57 57
58#define VERSION "2.8" 58#define VERSION "2.8"
59 59
60static struct proto_ops l2cap_sock_ops; 60static const struct proto_ops l2cap_sock_ops;
61 61
62static struct bt_sock_list l2cap_sk_list = { 62static struct bt_sock_list l2cap_sk_list = {
63 .lock = RW_LOCK_UNLOCKED 63 .lock = RW_LOCK_UNLOCKED
@@ -2161,7 +2161,7 @@ static ssize_t l2cap_sysfs_show(struct class *dev, char *buf)
2161 2161
2162static CLASS_ATTR(l2cap, S_IRUGO, l2cap_sysfs_show, NULL); 2162static CLASS_ATTR(l2cap, S_IRUGO, l2cap_sysfs_show, NULL);
2163 2163
2164static struct proto_ops l2cap_sock_ops = { 2164static const struct proto_ops l2cap_sock_ops = {
2165 .family = PF_BLUETOOTH, 2165 .family = PF_BLUETOOTH,
2166 .owner = THIS_MODULE, 2166 .owner = THIS_MODULE,
2167 .release = l2cap_sock_release, 2167 .release = l2cap_sock_release,
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 6c34261b232e..757d2dd3b02f 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -58,7 +58,7 @@
58#define BT_DBG(D...) 58#define BT_DBG(D...)
59#endif 59#endif
60 60
61static struct proto_ops rfcomm_sock_ops; 61static const struct proto_ops rfcomm_sock_ops;
62 62
63static struct bt_sock_list rfcomm_sk_list = { 63static struct bt_sock_list rfcomm_sk_list = {
64 .lock = RW_LOCK_UNLOCKED 64 .lock = RW_LOCK_UNLOCKED
@@ -907,7 +907,7 @@ static ssize_t rfcomm_sock_sysfs_show(struct class *dev, char *buf)
907 907
908static CLASS_ATTR(rfcomm, S_IRUGO, rfcomm_sock_sysfs_show, NULL); 908static CLASS_ATTR(rfcomm, S_IRUGO, rfcomm_sock_sysfs_show, NULL);
909 909
910static struct proto_ops rfcomm_sock_ops = { 910static const struct proto_ops rfcomm_sock_ops = {
911 .family = PF_BLUETOOTH, 911 .family = PF_BLUETOOTH,
912 .owner = THIS_MODULE, 912 .owner = THIS_MODULE,
913 .release = rfcomm_sock_release, 913 .release = rfcomm_sock_release,
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 648181430699..6b61323ce23c 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -56,7 +56,7 @@
56 56
57#define VERSION "0.5" 57#define VERSION "0.5"
58 58
59static struct proto_ops sco_sock_ops; 59static const struct proto_ops sco_sock_ops;
60 60
61static struct bt_sock_list sco_sk_list = { 61static struct bt_sock_list sco_sk_list = {
62 .lock = RW_LOCK_UNLOCKED 62 .lock = RW_LOCK_UNLOCKED
@@ -914,7 +914,7 @@ static ssize_t sco_sysfs_show(struct class *dev, char *buf)
914 914
915static CLASS_ATTR(sco, S_IRUGO, sco_sysfs_show, NULL); 915static CLASS_ATTR(sco, S_IRUGO, sco_sysfs_show, NULL);
916 916
917static struct proto_ops sco_sock_ops = { 917static const struct proto_ops sco_sock_ops = {
918 .family = PF_BLUETOOTH, 918 .family = PF_BLUETOOTH,
919 .owner = THIS_MODULE, 919 .owner = THIS_MODULE,
920 .release = sco_sock_release, 920 .release = sco_sock_release,
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 40a4c6899051..e4e629ed9bf7 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -680,7 +680,7 @@ void dccp_shutdown(struct sock *sk, int how)
680 680
681EXPORT_SYMBOL_GPL(dccp_shutdown); 681EXPORT_SYMBOL_GPL(dccp_shutdown);
682 682
683static struct proto_ops inet_dccp_ops = { 683static const struct proto_ops inet_dccp_ops = {
684 .family = PF_INET, 684 .family = PF_INET,
685 .owner = THIS_MODULE, 685 .owner = THIS_MODULE,
686 .release = inet_release, 686 .release = inet_release,
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index d402e9020c68..65e3baed0251 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -149,7 +149,7 @@ static void dn_keepalive(struct sock *sk);
149#define DN_SK_HASH_MASK (DN_SK_HASH_SIZE - 1) 149#define DN_SK_HASH_MASK (DN_SK_HASH_SIZE - 1)
150 150
151 151
152static struct proto_ops dn_proto_ops; 152static const struct proto_ops dn_proto_ops;
153static DEFINE_RWLOCK(dn_hash_lock); 153static DEFINE_RWLOCK(dn_hash_lock);
154static struct hlist_head dn_sk_hash[DN_SK_HASH_SIZE]; 154static struct hlist_head dn_sk_hash[DN_SK_HASH_SIZE];
155static struct hlist_head dn_wild_sk; 155static struct hlist_head dn_wild_sk;
@@ -2342,7 +2342,7 @@ static struct net_proto_family dn_family_ops = {
2342 .owner = THIS_MODULE, 2342 .owner = THIS_MODULE,
2343}; 2343};
2344 2344
2345static struct proto_ops dn_proto_ops = { 2345static const struct proto_ops dn_proto_ops = {
2346 .family = AF_DECnet, 2346 .family = AF_DECnet,
2347 .owner = THIS_MODULE, 2347 .owner = THIS_MODULE,
2348 .release = dn_release, 2348 .release = dn_release,
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 34fdac51df96..ff58f49c8b4a 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -45,7 +45,7 @@
45#include <asm/uaccess.h> 45#include <asm/uaccess.h>
46#include <asm/system.h> 46#include <asm/system.h>
47 47
48static struct proto_ops econet_ops; 48static const struct proto_ops econet_ops;
49static struct hlist_head econet_sklist; 49static struct hlist_head econet_sklist;
50static DEFINE_RWLOCK(econet_lock); 50static DEFINE_RWLOCK(econet_lock);
51 51
@@ -698,7 +698,7 @@ static struct net_proto_family econet_family_ops = {
698 .owner = THIS_MODULE, 698 .owner = THIS_MODULE,
699}; 699};
700 700
701static struct proto_ops SOCKOPS_WRAPPED(econet_ops) = { 701static const struct proto_ops SOCKOPS_WRAPPED(econet_ops) = {
702 .family = PF_ECONET, 702 .family = PF_ECONET,
703 .owner = THIS_MODULE, 703 .owner = THIS_MODULE,
704 .release = econet_release, 704 .release = econet_release,
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 617e858beff1..4ed8a814c6cb 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -785,7 +785,7 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
785 return err; 785 return err;
786} 786}
787 787
788struct proto_ops inet_stream_ops = { 788const struct proto_ops inet_stream_ops = {
789 .family = PF_INET, 789 .family = PF_INET,
790 .owner = THIS_MODULE, 790 .owner = THIS_MODULE,
791 .release = inet_release, 791 .release = inet_release,
@@ -806,7 +806,7 @@ struct proto_ops inet_stream_ops = {
806 .sendpage = tcp_sendpage 806 .sendpage = tcp_sendpage
807}; 807};
808 808
809struct proto_ops inet_dgram_ops = { 809const struct proto_ops inet_dgram_ops = {
810 .family = PF_INET, 810 .family = PF_INET,
811 .owner = THIS_MODULE, 811 .owner = THIS_MODULE,
812 .release = inet_release, 812 .release = inet_release,
@@ -831,7 +831,7 @@ struct proto_ops inet_dgram_ops = {
831 * For SOCK_RAW sockets; should be the same as inet_dgram_ops but without 831 * For SOCK_RAW sockets; should be the same as inet_dgram_ops but without
832 * udp_poll 832 * udp_poll
833 */ 833 */
834static struct proto_ops inet_sockraw_ops = { 834static const struct proto_ops inet_sockraw_ops = {
835 .family = PF_INET, 835 .family = PF_INET,
836 .owner = THIS_MODULE, 836 .owner = THIS_MODULE,
837 .release = inet_release, 837 .release = inet_release,
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 70a510ff31ee..7c9f19269f21 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -462,7 +462,7 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
462 return(0); 462 return(0);
463} 463}
464 464
465struct proto_ops inet6_stream_ops = { 465const struct proto_ops inet6_stream_ops = {
466 .family = PF_INET6, 466 .family = PF_INET6,
467 .owner = THIS_MODULE, 467 .owner = THIS_MODULE,
468 .release = inet6_release, 468 .release = inet6_release,
@@ -483,7 +483,7 @@ struct proto_ops inet6_stream_ops = {
483 .sendpage = tcp_sendpage 483 .sendpage = tcp_sendpage
484}; 484};
485 485
486struct proto_ops inet6_dgram_ops = { 486const struct proto_ops inet6_dgram_ops = {
487 .family = PF_INET6, 487 .family = PF_INET6,
488 .owner = THIS_MODULE, 488 .owner = THIS_MODULE,
489 .release = inet6_release, 489 .release = inet6_release,
@@ -511,7 +511,7 @@ static struct net_proto_family inet6_family_ops = {
511}; 511};
512 512
513/* Same as inet6_dgram_ops, sans udp_poll. */ 513/* Same as inet6_dgram_ops, sans udp_poll. */
514static struct proto_ops inet6_sockraw_ops = { 514static const struct proto_ops inet6_sockraw_ops = {
515 .family = PF_INET6, 515 .family = PF_INET6,
516 .owner = THIS_MODULE, 516 .owner = THIS_MODULE,
517 .release = inet6_release, 517 .release = inet6_release,
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 34b3bb868409..6c464c11bb09 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -75,7 +75,7 @@ static struct datalink_proto *pEII_datalink;
75static struct datalink_proto *p8023_datalink; 75static struct datalink_proto *p8023_datalink;
76static struct datalink_proto *pSNAP_datalink; 76static struct datalink_proto *pSNAP_datalink;
77 77
78static struct proto_ops ipx_dgram_ops; 78static const struct proto_ops ipx_dgram_ops;
79 79
80LIST_HEAD(ipx_interfaces); 80LIST_HEAD(ipx_interfaces);
81DEFINE_SPINLOCK(ipx_interfaces_lock); 81DEFINE_SPINLOCK(ipx_interfaces_lock);
@@ -1901,7 +1901,7 @@ static struct net_proto_family ipx_family_ops = {
1901 .owner = THIS_MODULE, 1901 .owner = THIS_MODULE,
1902}; 1902};
1903 1903
1904static struct proto_ops SOCKOPS_WRAPPED(ipx_dgram_ops) = { 1904static const struct proto_ops SOCKOPS_WRAPPED(ipx_dgram_ops) = {
1905 .family = PF_IPX, 1905 .family = PF_IPX,
1906 .owner = THIS_MODULE, 1906 .owner = THIS_MODULE,
1907 .release = ipx_release, 1907 .release = ipx_release,
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index f121f7de2032..e57683d424f7 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -62,12 +62,12 @@
62 62
63static int irda_create(struct socket *sock, int protocol); 63static int irda_create(struct socket *sock, int protocol);
64 64
65static struct proto_ops irda_stream_ops; 65static const struct proto_ops irda_stream_ops;
66static struct proto_ops irda_seqpacket_ops; 66static const struct proto_ops irda_seqpacket_ops;
67static struct proto_ops irda_dgram_ops; 67static const struct proto_ops irda_dgram_ops;
68 68
69#ifdef CONFIG_IRDA_ULTRA 69#ifdef CONFIG_IRDA_ULTRA
70static struct proto_ops irda_ultra_ops; 70static const struct proto_ops irda_ultra_ops;
71#define ULTRA_MAX_DATA 382 71#define ULTRA_MAX_DATA 382
72#endif /* CONFIG_IRDA_ULTRA */ 72#endif /* CONFIG_IRDA_ULTRA */
73 73
@@ -2464,7 +2464,7 @@ static struct net_proto_family irda_family_ops = {
2464 .owner = THIS_MODULE, 2464 .owner = THIS_MODULE,
2465}; 2465};
2466 2466
2467static struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = { 2467static const struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = {
2468 .family = PF_IRDA, 2468 .family = PF_IRDA,
2469 .owner = THIS_MODULE, 2469 .owner = THIS_MODULE,
2470 .release = irda_release, 2470 .release = irda_release,
@@ -2485,7 +2485,7 @@ static struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = {
2485 .sendpage = sock_no_sendpage, 2485 .sendpage = sock_no_sendpage,
2486}; 2486};
2487 2487
2488static struct proto_ops SOCKOPS_WRAPPED(irda_seqpacket_ops) = { 2488static const struct proto_ops SOCKOPS_WRAPPED(irda_seqpacket_ops) = {
2489 .family = PF_IRDA, 2489 .family = PF_IRDA,
2490 .owner = THIS_MODULE, 2490 .owner = THIS_MODULE,
2491 .release = irda_release, 2491 .release = irda_release,
@@ -2506,7 +2506,7 @@ static struct proto_ops SOCKOPS_WRAPPED(irda_seqpacket_ops) = {
2506 .sendpage = sock_no_sendpage, 2506 .sendpage = sock_no_sendpage,
2507}; 2507};
2508 2508
2509static struct proto_ops SOCKOPS_WRAPPED(irda_dgram_ops) = { 2509static const struct proto_ops SOCKOPS_WRAPPED(irda_dgram_ops) = {
2510 .family = PF_IRDA, 2510 .family = PF_IRDA,
2511 .owner = THIS_MODULE, 2511 .owner = THIS_MODULE,
2512 .release = irda_release, 2512 .release = irda_release,
@@ -2528,7 +2528,7 @@ static struct proto_ops SOCKOPS_WRAPPED(irda_dgram_ops) = {
2528}; 2528};
2529 2529
2530#ifdef CONFIG_IRDA_ULTRA 2530#ifdef CONFIG_IRDA_ULTRA
2531static struct proto_ops SOCKOPS_WRAPPED(irda_ultra_ops) = { 2531static const struct proto_ops SOCKOPS_WRAPPED(irda_ultra_ops) = {
2532 .family = PF_IRDA, 2532 .family = PF_IRDA,
2533 .owner = THIS_MODULE, 2533 .owner = THIS_MODULE,
2534 .release = irda_release, 2534 .release = irda_release,
diff --git a/net/key/af_key.c b/net/key/af_key.c
index d32f7791f1e4..52efd04cbedb 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -113,7 +113,7 @@ static __inline__ void pfkey_unlock_table(void)
113} 113}
114 114
115 115
116static struct proto_ops pfkey_ops; 116static const struct proto_ops pfkey_ops;
117 117
118static void pfkey_insert(struct sock *sk) 118static void pfkey_insert(struct sock *sk)
119{ 119{
@@ -3127,7 +3127,7 @@ out:
3127 return err; 3127 return err;
3128} 3128}
3129 3129
3130static struct proto_ops pfkey_ops = { 3130static const struct proto_ops pfkey_ops = {
3131 .family = PF_KEY, 3131 .family = PF_KEY,
3132 .owner = THIS_MODULE, 3132 .owner = THIS_MODULE,
3133 /* Operations that make no sense on pfkey sockets. */ 3133 /* Operations that make no sense on pfkey sockets. */
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index b6d3df5c911c..9cf65f9d8902 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -36,7 +36,7 @@
36static u16 llc_ui_sap_last_autoport = LLC_SAP_DYN_START; 36static u16 llc_ui_sap_last_autoport = LLC_SAP_DYN_START;
37static u16 llc_ui_sap_link_no_max[256]; 37static u16 llc_ui_sap_link_no_max[256];
38static struct sockaddr_llc llc_ui_addrnull; 38static struct sockaddr_llc llc_ui_addrnull;
39static struct proto_ops llc_ui_ops; 39static const struct proto_ops llc_ui_ops;
40 40
41static int llc_ui_wait_for_conn(struct sock *sk, long timeout); 41static int llc_ui_wait_for_conn(struct sock *sk, long timeout);
42static int llc_ui_wait_for_disc(struct sock *sk, long timeout); 42static int llc_ui_wait_for_disc(struct sock *sk, long timeout);
@@ -1098,7 +1098,7 @@ static struct net_proto_family llc_ui_family_ops = {
1098 .owner = THIS_MODULE, 1098 .owner = THIS_MODULE,
1099}; 1099};
1100 1100
1101static struct proto_ops llc_ui_ops = { 1101static const struct proto_ops llc_ui_ops = {
1102 .family = PF_LLC, 1102 .family = PF_LLC,
1103 .owner = THIS_MODULE, 1103 .owner = THIS_MODULE,
1104 .release = llc_ui_release, 1104 .release = llc_ui_release,
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 96020d7087e8..7849cac14d3a 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -293,7 +293,7 @@ static inline int nl_pid_hash_dilute(struct nl_pid_hash *hash, int len)
293 return 0; 293 return 0;
294} 294}
295 295
296static struct proto_ops netlink_ops; 296static const struct proto_ops netlink_ops;
297 297
298static int netlink_insert(struct sock *sk, u32 pid) 298static int netlink_insert(struct sock *sk, u32 pid)
299{ 299{
@@ -1656,7 +1656,7 @@ int netlink_unregister_notifier(struct notifier_block *nb)
1656 return notifier_chain_unregister(&netlink_chain, nb); 1656 return notifier_chain_unregister(&netlink_chain, nb);
1657} 1657}
1658 1658
1659static struct proto_ops netlink_ops = { 1659static const struct proto_ops netlink_ops = {
1660 .family = PF_NETLINK, 1660 .family = PF_NETLINK,
1661 .owner = THIS_MODULE, 1661 .owner = THIS_MODULE,
1662 .release = netlink_release, 1662 .release = netlink_release,
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index e5d82d711cae..05b653c05971 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -63,7 +63,7 @@ static unsigned short circuit = 0x101;
63static HLIST_HEAD(nr_list); 63static HLIST_HEAD(nr_list);
64static DEFINE_SPINLOCK(nr_list_lock); 64static DEFINE_SPINLOCK(nr_list_lock);
65 65
66static struct proto_ops nr_proto_ops; 66static const struct proto_ops nr_proto_ops;
67 67
68/* 68/*
69 * Socket removal during an interrupt is now safe. 69 * Socket removal during an interrupt is now safe.
@@ -1337,7 +1337,7 @@ static struct net_proto_family nr_family_ops = {
1337 .owner = THIS_MODULE, 1337 .owner = THIS_MODULE,
1338}; 1338};
1339 1339
1340static struct proto_ops nr_proto_ops = { 1340static const struct proto_ops nr_proto_ops = {
1341 .family = PF_NETROM, 1341 .family = PF_NETROM,
1342 .owner = THIS_MODULE, 1342 .owner = THIS_MODULE,
1343 .release = nr_release, 1343 .release = nr_release,
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 3e2462760413..deda6fdb1e53 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -251,10 +251,10 @@ static void packet_sock_destruct(struct sock *sk)
251} 251}
252 252
253 253
254static struct proto_ops packet_ops; 254static const struct proto_ops packet_ops;
255 255
256#ifdef CONFIG_SOCK_PACKET 256#ifdef CONFIG_SOCK_PACKET
257static struct proto_ops packet_ops_spkt; 257static const struct proto_ops packet_ops_spkt;
258 258
259static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) 259static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)
260{ 260{
@@ -1784,7 +1784,7 @@ out:
1784 1784
1785 1785
1786#ifdef CONFIG_SOCK_PACKET 1786#ifdef CONFIG_SOCK_PACKET
1787static struct proto_ops packet_ops_spkt = { 1787static const struct proto_ops packet_ops_spkt = {
1788 .family = PF_PACKET, 1788 .family = PF_PACKET,
1789 .owner = THIS_MODULE, 1789 .owner = THIS_MODULE,
1790 .release = packet_release, 1790 .release = packet_release,
@@ -1806,7 +1806,7 @@ static struct proto_ops packet_ops_spkt = {
1806}; 1806};
1807#endif 1807#endif
1808 1808
1809static struct proto_ops packet_ops = { 1809static const struct proto_ops packet_ops = {
1810 .family = PF_PACKET, 1810 .family = PF_PACKET,
1811 .owner = THIS_MODULE, 1811 .owner = THIS_MODULE,
1812 .release = packet_release, 1812 .release = packet_release,
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index fa3be2b8fb5f..15c05165c905 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -866,7 +866,7 @@ static int sctp_inet6_supported_addrs(const struct sctp_sock *opt,
866 return 2; 866 return 2;
867} 867}
868 868
869static struct proto_ops inet6_seqpacket_ops = { 869static const struct proto_ops inet6_seqpacket_ops = {
870 .family = PF_INET6, 870 .family = PF_INET6,
871 .owner = THIS_MODULE, 871 .owner = THIS_MODULE,
872 .release = inet6_release, 872 .release = inet6_release,
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index f775d78aa59d..d1b0747a5b9d 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -829,7 +829,7 @@ static struct notifier_block sctp_inetaddr_notifier = {
829}; 829};
830 830
831/* Socket operations. */ 831/* Socket operations. */
832static struct proto_ops inet_seqpacket_ops = { 832static const struct proto_ops inet_seqpacket_ops = {
833 .family = PF_INET, 833 .family = PF_INET,
834 .owner = THIS_MODULE, 834 .owner = THIS_MODULE,
835 .release = inet_release, /* Needs to be wrapped... */ 835 .release = inet_release, /* Needs to be wrapped... */
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index c6a51911e71e..d68eba481291 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -758,7 +758,7 @@ svc_tcp_accept(struct svc_sock *svsk)
758 struct svc_serv *serv = svsk->sk_server; 758 struct svc_serv *serv = svsk->sk_server;
759 struct socket *sock = svsk->sk_sock; 759 struct socket *sock = svsk->sk_sock;
760 struct socket *newsock; 760 struct socket *newsock;
761 struct proto_ops *ops; 761 const struct proto_ops *ops;
762 struct svc_sock *newsvsk; 762 struct svc_sock *newsvsk;
763 int err, slen; 763 int err, slen;
764 764
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 04e850e04e3d..7d3fe6aebcdb 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -473,7 +473,7 @@ static int unix_dgram_connect(struct socket *, struct sockaddr *,
473static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *, 473static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *,
474 struct msghdr *, size_t); 474 struct msghdr *, size_t);
475 475
476static struct proto_ops unix_stream_ops = { 476static const struct proto_ops unix_stream_ops = {
477 .family = PF_UNIX, 477 .family = PF_UNIX,
478 .owner = THIS_MODULE, 478 .owner = THIS_MODULE,
479 .release = unix_release, 479 .release = unix_release,
@@ -494,7 +494,7 @@ static struct proto_ops unix_stream_ops = {
494 .sendpage = sock_no_sendpage, 494 .sendpage = sock_no_sendpage,
495}; 495};
496 496
497static struct proto_ops unix_dgram_ops = { 497static const struct proto_ops unix_dgram_ops = {
498 .family = PF_UNIX, 498 .family = PF_UNIX,
499 .owner = THIS_MODULE, 499 .owner = THIS_MODULE,
500 .release = unix_release, 500 .release = unix_release,
@@ -515,7 +515,7 @@ static struct proto_ops unix_dgram_ops = {
515 .sendpage = sock_no_sendpage, 515 .sendpage = sock_no_sendpage,
516}; 516};
517 517
518static struct proto_ops unix_seqpacket_ops = { 518static const struct proto_ops unix_seqpacket_ops = {
519 .family = PF_UNIX, 519 .family = PF_UNIX,
520 .owner = THIS_MODULE, 520 .owner = THIS_MODULE,
521 .release = unix_release, 521 .release = unix_release,
diff --git a/net/wanrouter/af_wanpipe.c b/net/wanrouter/af_wanpipe.c
index 59fec59b2132..67948bf22dc4 100644
--- a/net/wanrouter/af_wanpipe.c
+++ b/net/wanrouter/af_wanpipe.c
@@ -181,7 +181,7 @@ struct wanpipe_opt
181#endif 181#endif
182 182
183static int sk_count; 183static int sk_count;
184extern struct proto_ops wanpipe_ops; 184extern const struct proto_ops wanpipe_ops;
185static unsigned long find_free_critical; 185static unsigned long find_free_critical;
186 186
187static void wanpipe_unlink_driver(struct sock *sk); 187static void wanpipe_unlink_driver(struct sock *sk);
@@ -2546,7 +2546,7 @@ static int wanpipe_connect(struct socket *sock, struct sockaddr *uaddr, int addr
2546 return 0; 2546 return 0;
2547} 2547}
2548 2548
2549struct proto_ops wanpipe_ops = { 2549const struct proto_ops wanpipe_ops = {
2550 .family = PF_WANPIPE, 2550 .family = PF_WANPIPE,
2551 .owner = THIS_MODULE, 2551 .owner = THIS_MODULE,
2552 .release = wanpipe_release, 2552 .release = wanpipe_release,
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 020d73cc8414..ca8b3b0b920d 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -64,7 +64,7 @@ int sysctl_x25_ack_holdback_timeout = X25_DEFAULT_T2;
64HLIST_HEAD(x25_list); 64HLIST_HEAD(x25_list);
65DEFINE_RWLOCK(x25_list_lock); 65DEFINE_RWLOCK(x25_list_lock);
66 66
67static struct proto_ops x25_proto_ops; 67static const struct proto_ops x25_proto_ops;
68 68
69static struct x25_address null_x25_address = {" "}; 69static struct x25_address null_x25_address = {" "};
70 70
@@ -1391,7 +1391,7 @@ static struct net_proto_family x25_family_ops = {
1391 .owner = THIS_MODULE, 1391 .owner = THIS_MODULE,
1392}; 1392};
1393 1393
1394static struct proto_ops SOCKOPS_WRAPPED(x25_proto_ops) = { 1394static const struct proto_ops SOCKOPS_WRAPPED(x25_proto_ops) = {
1395 .family = AF_X25, 1395 .family = AF_X25,
1396 .owner = THIS_MODULE, 1396 .owner = THIS_MODULE,
1397 .release = x25_release, 1397 .release = x25_release,