aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-10-05 01:58:39 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-07 04:10:46 -0400
commitec1b4cf74c81bfd0fbe5bf62bafc86c45917e72f (patch)
tree1b693e4e027f3e42224e6221ae018daeb562e5e1 /net
parentf7734fdf61ec6bb848e0bafc1fb8bad2c124bb50 (diff)
net: mark net_proto_ops as const
All usages of structure net_proto_ops should be declared const. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/appletalk/ddp.c2
-rw-r--r--net/atm/pvc.c2
-rw-r--r--net/atm/svc.c2
-rw-r--r--net/ax25/af_ax25.c2
-rw-r--r--net/bluetooth/af_bluetooth.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.c2
-rw-r--r--net/bluetooth/rfcomm/sock.c2
-rw-r--r--net/bluetooth/sco.c2
-rw-r--r--net/can/af_can.c2
-rw-r--r--net/decnet/af_decnet.c2
-rw-r--r--net/econet/af_econet.c2
-rw-r--r--net/ieee802154/af_ieee802154.c2
-rw-r--r--net/ipv4/af_inet.c2
-rw-r--r--net/ipv6/af_inet6.c2
-rw-r--r--net/ipx/af_ipx.c2
-rw-r--r--net/irda/af_irda.c2
-rw-r--r--net/iucv/af_iucv.c2
-rw-r--r--net/key/af_key.c2
-rw-r--r--net/llc/af_llc.c2
-rw-r--r--net/netlink/af_netlink.c2
-rw-r--r--net/netrom/af_netrom.c2
-rw-r--r--net/packet/af_packet.c2
-rw-r--r--net/phonet/af_phonet.c2
-rw-r--r--net/rds/af_rds.c2
-rw-r--r--net/rose/af_rose.c2
-rw-r--r--net/rxrpc/af_rxrpc.c2
-rw-r--r--net/unix/af_unix.c2
-rw-r--r--net/x25/af_x25.c2
32 files changed, 33 insertions, 33 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index b1a4290996b5..abe38014b7fd 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1821,7 +1821,7 @@ static int atalk_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned lo
1821#endif 1821#endif
1822 1822
1823 1823
1824static struct net_proto_family atalk_family_ops = { 1824static const struct net_proto_family atalk_family_ops = {
1825 .family = PF_APPLETALK, 1825 .family = PF_APPLETALK,
1826 .create = atalk_create, 1826 .create = atalk_create,
1827 .owner = THIS_MODULE, 1827 .owner = THIS_MODULE,
diff --git a/net/atm/pvc.c b/net/atm/pvc.c
index d4c024504f99..a6e1fdbae87f 100644
--- a/net/atm/pvc.c
+++ b/net/atm/pvc.c
@@ -137,7 +137,7 @@ static int pvc_create(struct net *net, struct socket *sock,int protocol)
137} 137}
138 138
139 139
140static struct net_proto_family pvc_family_ops = { 140static const struct net_proto_family pvc_family_ops = {
141 .family = PF_ATMPVC, 141 .family = PF_ATMPVC,
142 .create = pvc_create, 142 .create = pvc_create,
143 .owner = THIS_MODULE, 143 .owner = THIS_MODULE,
diff --git a/net/atm/svc.c b/net/atm/svc.c
index f90d143c4b25..819354233318 100644
--- a/net/atm/svc.c
+++ b/net/atm/svc.c
@@ -666,7 +666,7 @@ static int svc_create(struct net *net, struct socket *sock,int protocol)
666} 666}
667 667
668 668
669static struct net_proto_family svc_family_ops = { 669static const struct net_proto_family svc_family_ops = {
670 .family = PF_ATMSVC, 670 .family = PF_ATMSVC,
671 .create = svc_create, 671 .create = svc_create,
672 .owner = THIS_MODULE, 672 .owner = THIS_MODULE,
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index f45460730371..f05306f168fa 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1961,7 +1961,7 @@ static const struct file_operations ax25_info_fops = {
1961 1961
1962#endif 1962#endif
1963 1963
1964static struct net_proto_family ax25_family_ops = { 1964static const struct net_proto_family ax25_family_ops = {
1965 .family = PF_AX25, 1965 .family = PF_AX25,
1966 .create = ax25_create, 1966 .create = ax25_create,
1967 .owner = THIS_MODULE, 1967 .owner = THIS_MODULE,
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 8cfb5a849841..1f6e49c1cde8 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -45,7 +45,7 @@
45 45
46/* Bluetooth sockets */ 46/* Bluetooth sockets */
47#define BT_MAX_PROTO 8 47#define BT_MAX_PROTO 8
48static struct net_proto_family *bt_proto[BT_MAX_PROTO]; 48static const struct net_proto_family *bt_proto[BT_MAX_PROTO];
49static DEFINE_RWLOCK(bt_proto_lock); 49static DEFINE_RWLOCK(bt_proto_lock);
50 50
51static struct lock_class_key bt_lock_key[BT_MAX_PROTO]; 51static struct lock_class_key bt_lock_key[BT_MAX_PROTO];
@@ -86,7 +86,7 @@ static inline void bt_sock_reclassify_lock(struct socket *sock, int proto)
86 bt_key_strings[proto], &bt_lock_key[proto]); 86 bt_key_strings[proto], &bt_lock_key[proto]);
87} 87}
88 88
89int bt_sock_register(int proto, struct net_proto_family *ops) 89int bt_sock_register(int proto, const struct net_proto_family *ops)
90{ 90{
91 int err = 0; 91 int err = 0;
92 92
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c
index e857628b0b27..0a2c5460bb48 100644
--- a/net/bluetooth/bnep/sock.c
+++ b/net/bluetooth/bnep/sock.c
@@ -222,7 +222,7 @@ static int bnep_sock_create(struct net *net, struct socket *sock, int protocol)
222 return 0; 222 return 0;
223} 223}
224 224
225static struct net_proto_family bnep_sock_family_ops = { 225static const struct net_proto_family bnep_sock_family_ops = {
226 .family = PF_BLUETOOTH, 226 .family = PF_BLUETOOTH,
227 .owner = THIS_MODULE, 227 .owner = THIS_MODULE,
228 .create = bnep_sock_create 228 .create = bnep_sock_create
diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c
index 16b0fad74f6e..de7c8040bc56 100644
--- a/net/bluetooth/cmtp/sock.c
+++ b/net/bluetooth/cmtp/sock.c
@@ -217,7 +217,7 @@ static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol)
217 return 0; 217 return 0;
218} 218}
219 219
220static struct net_proto_family cmtp_sock_family_ops = { 220static const struct net_proto_family cmtp_sock_family_ops = {
221 .family = PF_BLUETOOTH, 221 .family = PF_BLUETOOTH,
222 .owner = THIS_MODULE, 222 .owner = THIS_MODULE,
223 .create = cmtp_sock_create 223 .create = cmtp_sock_create
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 75302a986067..e7395f231989 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -687,7 +687,7 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event,
687 return NOTIFY_DONE; 687 return NOTIFY_DONE;
688} 688}
689 689
690static struct net_proto_family hci_sock_family_ops = { 690static const struct net_proto_family hci_sock_family_ops = {
691 .family = PF_BLUETOOTH, 691 .family = PF_BLUETOOTH,
692 .owner = THIS_MODULE, 692 .owner = THIS_MODULE,
693 .create = hci_sock_create, 693 .create = hci_sock_create,
diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c
index 37c9d7d2e688..4beb6a7a2953 100644
--- a/net/bluetooth/hidp/sock.c
+++ b/net/bluetooth/hidp/sock.c
@@ -268,7 +268,7 @@ static int hidp_sock_create(struct net *net, struct socket *sock, int protocol)
268 return 0; 268 return 0;
269} 269}
270 270
271static struct net_proto_family hidp_sock_family_ops = { 271static const struct net_proto_family hidp_sock_family_ops = {
272 .family = PF_BLUETOOTH, 272 .family = PF_BLUETOOTH,
273 .owner = THIS_MODULE, 273 .owner = THIS_MODULE,
274 .create = hidp_sock_create 274 .create = hidp_sock_create
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 555d9da1869b..4b66bd579f4a 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -3916,7 +3916,7 @@ static const struct proto_ops l2cap_sock_ops = {
3916 .getsockopt = l2cap_sock_getsockopt 3916 .getsockopt = l2cap_sock_getsockopt
3917}; 3917};
3918 3918
3919static struct net_proto_family l2cap_sock_family_ops = { 3919static const struct net_proto_family l2cap_sock_family_ops = {
3920 .family = PF_BLUETOOTH, 3920 .family = PF_BLUETOOTH,
3921 .owner = THIS_MODULE, 3921 .owner = THIS_MODULE,
3922 .create = l2cap_sock_create, 3922 .create = l2cap_sock_create,
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 8a20aaf1f231..c70786503850 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -1101,7 +1101,7 @@ static const struct proto_ops rfcomm_sock_ops = {
1101 .mmap = sock_no_mmap 1101 .mmap = sock_no_mmap
1102}; 1102};
1103 1103
1104static struct net_proto_family rfcomm_sock_family_ops = { 1104static const struct net_proto_family rfcomm_sock_family_ops = {
1105 .family = PF_BLUETOOTH, 1105 .family = PF_BLUETOOTH,
1106 .owner = THIS_MODULE, 1106 .owner = THIS_MODULE,
1107 .create = rfcomm_sock_create 1107 .create = rfcomm_sock_create
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 77f4153bdb5e..694a65541b73 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -993,7 +993,7 @@ static const struct proto_ops sco_sock_ops = {
993 .getsockopt = sco_sock_getsockopt 993 .getsockopt = sco_sock_getsockopt
994}; 994};
995 995
996static struct net_proto_family sco_sock_family_ops = { 996static const struct net_proto_family sco_sock_family_ops = {
997 .family = PF_BLUETOOTH, 997 .family = PF_BLUETOOTH,
998 .owner = THIS_MODULE, 998 .owner = THIS_MODULE,
999 .create = sco_sock_create, 999 .create = sco_sock_create,
diff --git a/net/can/af_can.c b/net/can/af_can.c
index 606832115674..3f2eb27e1ffb 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -842,7 +842,7 @@ static struct packet_type can_packet __read_mostly = {
842 .func = can_rcv, 842 .func = can_rcv,
843}; 843};
844 844
845static struct net_proto_family can_family_ops __read_mostly = { 845static const struct net_proto_family can_family_ops = {
846 .family = PF_CAN, 846 .family = PF_CAN,
847 .create = can_create, 847 .create = can_create,
848 .owner = THIS_MODULE, 848 .owner = THIS_MODULE,
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 7a58c87baf17..4d3060660a14 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -2325,7 +2325,7 @@ static const struct file_operations dn_socket_seq_fops = {
2325}; 2325};
2326#endif 2326#endif
2327 2327
2328static struct net_proto_family dn_family_ops = { 2328static const struct net_proto_family dn_family_ops = {
2329 .family = AF_DECnet, 2329 .family = AF_DECnet,
2330 .create = dn_create, 2330 .create = dn_create,
2331 .owner = THIS_MODULE, 2331 .owner = THIS_MODULE,
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 0e0254fd767d..6529be3a18b7 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -742,7 +742,7 @@ static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg
742 return 0; 742 return 0;
743} 743}
744 744
745static struct net_proto_family econet_family_ops = { 745static const struct net_proto_family econet_family_ops = {
746 .family = PF_ECONET, 746 .family = PF_ECONET,
747 .create = econet_create, 747 .create = econet_create,
748 .owner = THIS_MODULE, 748 .owner = THIS_MODULE,
diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c
index cd949d5e451b..309348fba72b 100644
--- a/net/ieee802154/af_ieee802154.c
+++ b/net/ieee802154/af_ieee802154.c
@@ -285,7 +285,7 @@ out:
285 return rc; 285 return rc;
286} 286}
287 287
288static struct net_proto_family ieee802154_family_ops = { 288static const struct net_proto_family ieee802154_family_ops = {
289 .family = PF_IEEE802154, 289 .family = PF_IEEE802154,
290 .create = ieee802154_create, 290 .create = ieee802154_create,
291 .owner = THIS_MODULE, 291 .owner = THIS_MODULE,
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 57737b8d1711..1deff48b122e 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -931,7 +931,7 @@ static const struct proto_ops inet_sockraw_ops = {
931#endif 931#endif
932}; 932};
933 933
934static struct net_proto_family inet_family_ops = { 934static const struct net_proto_family inet_family_ops = {
935 .family = PF_INET, 935 .family = PF_INET,
936 .create = inet_create, 936 .create = inet_create,
937 .owner = THIS_MODULE, 937 .owner = THIS_MODULE,
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index da36497ae647..94216519873c 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -552,7 +552,7 @@ const struct proto_ops inet6_dgram_ops = {
552#endif 552#endif
553}; 553};
554 554
555static struct net_proto_family inet6_family_ops = { 555static const struct net_proto_family inet6_family_ops = {
556 .family = PF_INET6, 556 .family = PF_INET6,
557 .create = inet6_create, 557 .create = inet6_create,
558 .owner = THIS_MODULE, 558 .owner = THIS_MODULE,
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 66c7a20011f3..6481ee4bdf72 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -1927,7 +1927,7 @@ static int ipx_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long
1927 * Socket family declarations 1927 * Socket family declarations
1928 */ 1928 */
1929 1929
1930static struct net_proto_family ipx_family_ops = { 1930static const struct net_proto_family ipx_family_ops = {
1931 .family = PF_IPX, 1931 .family = PF_IPX,
1932 .create = ipx_create, 1932 .create = ipx_create,
1933 .owner = THIS_MODULE, 1933 .owner = THIS_MODULE,
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index dd35641835f4..9429e4002bca 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -2463,7 +2463,7 @@ bed:
2463 return 0; 2463 return 0;
2464} 2464}
2465 2465
2466static struct net_proto_family irda_family_ops = { 2466static const struct net_proto_family irda_family_ops = {
2467 .family = PF_IRDA, 2467 .family = PF_IRDA,
2468 .create = irda_create, 2468 .create = irda_create,
2469 .owner = THIS_MODULE, 2469 .owner = THIS_MODULE,
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index bada1b9c670b..004134b60d86 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -1715,7 +1715,7 @@ static const struct proto_ops iucv_sock_ops = {
1715 .getsockopt = iucv_sock_getsockopt, 1715 .getsockopt = iucv_sock_getsockopt,
1716}; 1716};
1717 1717
1718static struct net_proto_family iucv_sock_family_ops = { 1718static const struct net_proto_family iucv_sock_family_ops = {
1719 .family = AF_IUCV, 1719 .family = AF_IUCV,
1720 .owner = THIS_MODULE, 1720 .owner = THIS_MODULE,
1721 .create = iucv_sock_create, 1721 .create = iucv_sock_create,
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 4e98193dfa0f..c078ae6e975b 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3644,7 +3644,7 @@ static const struct proto_ops pfkey_ops = {
3644 .recvmsg = pfkey_recvmsg, 3644 .recvmsg = pfkey_recvmsg,
3645}; 3645};
3646 3646
3647static struct net_proto_family pfkey_family_ops = { 3647static const struct net_proto_family pfkey_family_ops = {
3648 .family = PF_KEY, 3648 .family = PF_KEY,
3649 .create = pfkey_create, 3649 .create = pfkey_create,
3650 .owner = THIS_MODULE, 3650 .owner = THIS_MODULE,
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 7aa4fd170104..4866b4fb0c27 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -1092,7 +1092,7 @@ out:
1092 return rc; 1092 return rc;
1093} 1093}
1094 1094
1095static struct net_proto_family llc_ui_family_ops = { 1095static const struct net_proto_family llc_ui_family_ops = {
1096 .family = PF_LLC, 1096 .family = PF_LLC,
1097 .create = llc_ui_create, 1097 .create = llc_ui_create,
1098 .owner = THIS_MODULE, 1098 .owner = THIS_MODULE,
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 19e98007691c..0cd2d8829313 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2050,7 +2050,7 @@ static const struct proto_ops netlink_ops = {
2050 .sendpage = sock_no_sendpage, 2050 .sendpage = sock_no_sendpage,
2051}; 2051};
2052 2052
2053static struct net_proto_family netlink_family_ops = { 2053static const struct net_proto_family netlink_family_ops = {
2054 .family = PF_NETLINK, 2054 .family = PF_NETLINK,
2055 .create = netlink_create, 2055 .create = netlink_create,
2056 .owner = THIS_MODULE, /* for consistency 8) */ 2056 .owner = THIS_MODULE, /* for consistency 8) */
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 7a834952f67f..281fa597cae5 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1372,7 +1372,7 @@ static const struct file_operations nr_info_fops = {
1372}; 1372};
1373#endif /* CONFIG_PROC_FS */ 1373#endif /* CONFIG_PROC_FS */
1374 1374
1375static struct net_proto_family nr_family_ops = { 1375static const struct net_proto_family nr_family_ops = {
1376 .family = PF_NETROM, 1376 .family = PF_NETROM,
1377 .create = nr_create, 1377 .create = nr_create,
1378 .owner = THIS_MODULE, 1378 .owner = THIS_MODULE,
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index efc1174af716..70073a0dea5d 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -2399,7 +2399,7 @@ static const struct proto_ops packet_ops = {
2399 .sendpage = sock_no_sendpage, 2399 .sendpage = sock_no_sendpage,
2400}; 2400};
2401 2401
2402static struct net_proto_family packet_family_ops = { 2402static const struct net_proto_family packet_family_ops = {
2403 .family = PF_PACKET, 2403 .family = PF_PACKET,
2404 .create = packet_create, 2404 .create = packet_create,
2405 .owner = THIS_MODULE, 2405 .owner = THIS_MODULE,
diff --git a/net/phonet/af_phonet.c b/net/phonet/af_phonet.c
index f60c0c2aacba..c711d58b4bb5 100644
--- a/net/phonet/af_phonet.c
+++ b/net/phonet/af_phonet.c
@@ -118,7 +118,7 @@ out:
118 return err; 118 return err;
119} 119}
120 120
121static struct net_proto_family phonet_proto_family = { 121static const struct net_proto_family phonet_proto_family = {
122 .family = PF_PHONET, 122 .family = PF_PHONET,
123 .create = pn_socket_create, 123 .create = pn_socket_create,
124 .owner = THIS_MODULE, 124 .owner = THIS_MODULE,
diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c
index 98e05382fd3c..a202e5b36079 100644
--- a/net/rds/af_rds.c
+++ b/net/rds/af_rds.c
@@ -431,7 +431,7 @@ void rds_sock_put(struct rds_sock *rs)
431 sock_put(rds_rs_to_sk(rs)); 431 sock_put(rds_rs_to_sk(rs));
432} 432}
433 433
434static struct net_proto_family rds_family_ops = { 434static const struct net_proto_family rds_family_ops = {
435 .family = AF_RDS, 435 .family = AF_RDS,
436 .create = rds_create, 436 .create = rds_create,
437 .owner = THIS_MODULE, 437 .owner = THIS_MODULE,
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 502cce76621d..c17734c2ce89 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -1509,7 +1509,7 @@ static const struct file_operations rose_info_fops = {
1509}; 1509};
1510#endif /* CONFIG_PROC_FS */ 1510#endif /* CONFIG_PROC_FS */
1511 1511
1512static struct net_proto_family rose_family_ops = { 1512static const struct net_proto_family rose_family_ops = {
1513 .family = PF_ROSE, 1513 .family = PF_ROSE,
1514 .create = rose_create, 1514 .create = rose_create,
1515 .owner = THIS_MODULE, 1515 .owner = THIS_MODULE,
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index a86afceaa94f..6817c9781ef3 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -777,7 +777,7 @@ static struct proto rxrpc_proto = {
777 .max_header = sizeof(struct rxrpc_header), 777 .max_header = sizeof(struct rxrpc_header),
778}; 778};
779 779
780static struct net_proto_family rxrpc_family_ops = { 780static const struct net_proto_family rxrpc_family_ops = {
781 .family = PF_RXRPC, 781 .family = PF_RXRPC,
782 .create = rxrpc_create, 782 .create = rxrpc_create,
783 .owner = THIS_MODULE, 783 .owner = THIS_MODULE,
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 51ab497115eb..0f133c5a8d3c 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2214,7 +2214,7 @@ static const struct file_operations unix_seq_fops = {
2214 2214
2215#endif 2215#endif
2216 2216
2217static struct net_proto_family unix_family_ops = { 2217static const struct net_proto_family unix_family_ops = {
2218 .family = PF_UNIX, 2218 .family = PF_UNIX,
2219 .create = unix_create, 2219 .create = unix_create,
2220 .owner = THIS_MODULE, 2220 .owner = THIS_MODULE,
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 7fa9c7ad3d3b..ebbfe6bbbff9 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -1476,7 +1476,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1476 return rc; 1476 return rc;
1477} 1477}
1478 1478
1479static struct net_proto_family x25_family_ops = { 1479static const struct net_proto_family x25_family_ops = {
1480 .family = AF_X25, 1480 .family = AF_X25,
1481 .create = x25_create, 1481 .create = x25_create,
1482 .owner = THIS_MODULE, 1482 .owner = THIS_MODULE,