Commit 173e7837 authored by linzhang's avatar linzhang Committed by David S. Miller

net: socket: mark socket protocol handler structs as const

Signed-off-by: default avatarlinzhang <xiaolou4617@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9aef88ec
...@@ -733,7 +733,7 @@ void bt_procfs_cleanup(struct net *net, const char *name) ...@@ -733,7 +733,7 @@ void bt_procfs_cleanup(struct net *net, const char *name)
EXPORT_SYMBOL(bt_procfs_init); EXPORT_SYMBOL(bt_procfs_init);
EXPORT_SYMBOL(bt_procfs_cleanup); 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, .owner = THIS_MODULE,
.family = PF_BLUETOOTH, .family = PF_BLUETOOTH,
.create = bt_sock_create, .create = bt_sock_create,
......
...@@ -1099,7 +1099,7 @@ static int caif_create(struct net *net, struct socket *sock, int protocol, ...@@ -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, .family = PF_CAIF,
.create = caif_create, .create = caif_create,
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
...@@ -1985,7 +1985,7 @@ static int kcm_create(struct net *net, struct socket *sock, ...@@ -1985,7 +1985,7 @@ static int kcm_create(struct net *net, struct socket *sock,
return 0; return 0;
} }
static struct net_proto_family kcm_family_ops = { static const struct net_proto_family kcm_family_ops = {
.family = PF_KCM, .family = PF_KCM,
.create = kcm_create, .create = kcm_create,
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
...@@ -48,7 +48,7 @@ static int nfc_sock_create(struct net *net, struct socket *sock, int proto, ...@@ -48,7 +48,7 @@ static int nfc_sock_create(struct net *net, struct socket *sock, int proto,
return rc; return rc;
} }
static struct net_proto_family nfc_sock_family_ops = { static const struct net_proto_family nfc_sock_family_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.family = PF_NFC, .family = PF_NFC,
.create = nfc_sock_create, .create = nfc_sock_create,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment