Skip to content

Commit

Permalink
net: socket: mark socket protocol handler structs as const
Browse files Browse the repository at this point in the history
Signed-off-by: linzhang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
linzhang authored and davem330 committed May 16, 2017
1 parent 9aef88e commit 173e783
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion net/bluetooth/af_bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion net/caif/caif_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion net/kcm/kcmsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion net/nfc/af_nfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 173e783

Please sign in to comment.