diff options
Diffstat (limited to 'net/netrom/af_netrom.c')
-rw-r--r-- | net/netrom/af_netrom.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 7a834952f67f..71604c6613b5 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -425,12 +425,13 @@ static struct proto nr_proto = { | |||
425 | .obj_size = sizeof(struct nr_sock), | 425 | .obj_size = sizeof(struct nr_sock), |
426 | }; | 426 | }; |
427 | 427 | ||
428 | static int nr_create(struct net *net, struct socket *sock, int protocol) | 428 | static int nr_create(struct net *net, struct socket *sock, int protocol, |
429 | int kern) | ||
429 | { | 430 | { |
430 | struct sock *sk; | 431 | struct sock *sk; |
431 | struct nr_sock *nr; | 432 | struct nr_sock *nr; |
432 | 433 | ||
433 | if (net != &init_net) | 434 | if (!net_eq(net, &init_net)) |
434 | return -EAFNOSUPPORT; | 435 | return -EAFNOSUPPORT; |
435 | 436 | ||
436 | if (sock->type != SOCK_SEQPACKET || protocol != 0) | 437 | if (sock->type != SOCK_SEQPACKET || protocol != 0) |
@@ -1372,7 +1373,7 @@ static const struct file_operations nr_info_fops = { | |||
1372 | }; | 1373 | }; |
1373 | #endif /* CONFIG_PROC_FS */ | 1374 | #endif /* CONFIG_PROC_FS */ |
1374 | 1375 | ||
1375 | static struct net_proto_family nr_family_ops = { | 1376 | static const struct net_proto_family nr_family_ops = { |
1376 | .family = PF_NETROM, | 1377 | .family = PF_NETROM, |
1377 | .create = nr_create, | 1378 | .create = nr_create, |
1378 | .owner = THIS_MODULE, | 1379 | .owner = THIS_MODULE, |