net: socket: mark socket protocol handler structs as const
authorlinzhang <xiaolou4617@gmail.com>
Mon, 15 May 2017 02:26:47 +0000 (10:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 May 2017 15:54:07 +0000 (11:54 -0400)
Signed-off-by: linzhang <xiaolou4617@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bluetooth/af_bluetooth.c
net/caif/caif_socket.c
net/kcm/kcmsock.c
net/nfc/af_nfc.c

index 42d0997e2fbb78af58970504baf0d855d72a964a..8a8f77a247e60ad569b157c21ca6740cd847b3e1 100644 (file)
@@ -733,7 +733,7 @@ void bt_procfs_cleanup(struct net *net, const char *name)
 EXPORT_SYMBOL(bt_procfs_init);
 EXPORT_SYMBOL(bt_procfs_cleanup);
 
-static struct net_proto_family bt_sock_family_ops = {
+static const struct net_proto_family bt_sock_family_ops = {
        .owner  = THIS_MODULE,
        .family = PF_BLUETOOTH,
        .create = bt_sock_create,
index adcad344c843985435958890583761e865a25374..4674d17e7c08fbebd3fbf566b78ae7b5502a4966 100644 (file)
@@ -1099,7 +1099,7 @@ static int caif_create(struct net *net, struct socket *sock, int protocol,
 }
 
 
-static struct net_proto_family caif_family_ops = {
+static const struct net_proto_family caif_family_ops = {
        .family = PF_CAIF,
        .create = caif_create,
        .owner = THIS_MODULE,
index deca20fb2ce2e5e50063e58ec2c0d9d6239d3bd4..da49191f7ad0d7edfda0c10762ef5f7471a8f6ac 100644 (file)
@@ -1985,7 +1985,7 @@ static int kcm_create(struct net *net, struct socket *sock,
        return 0;
 }
 
-static struct net_proto_family kcm_family_ops = {
+static const struct net_proto_family kcm_family_ops = {
        .family = PF_KCM,
        .create = kcm_create,
        .owner  = THIS_MODULE,
index 54e40fa47822673d760862a67fa1955ebbd0143b..d3e594eb36d0aaafebe63f439b0b5a7145657eed 100644 (file)
@@ -48,7 +48,7 @@ static int nfc_sock_create(struct net *net, struct socket *sock, int proto,
        return rc;
 }
 
-static struct net_proto_family nfc_sock_family_ops = {
+static const struct net_proto_family nfc_sock_family_ops = {
        .owner  = THIS_MODULE,
        .family = PF_NFC,
        .create = nfc_sock_create,