summaryrefslogtreecommitdiffstats
path: root/kernel/net/nfc/rawsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/net/nfc/rawsock.c')
-rw-r--r--kernel/net/nfc/rawsock.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/net/nfc/rawsock.c b/kernel/net/nfc/rawsock.c
index 82b4e8024..e386e6c90 100644
--- a/kernel/net/nfc/rawsock.c
+++ b/kernel/net/nfc/rawsock.c
@@ -321,7 +321,8 @@ static void rawsock_destruct(struct sock *sk)
if (sk->sk_state == TCP_ESTABLISHED) {
nfc_deactivate_target(nfc_rawsock(sk)->dev,
- nfc_rawsock(sk)->target_idx);
+ nfc_rawsock(sk)->target_idx,
+ NFC_TARGET_MODE_IDLE);
nfc_put_device(nfc_rawsock(sk)->dev);
}
@@ -334,7 +335,7 @@ static void rawsock_destruct(struct sock *sk)
}
static int rawsock_create(struct net *net, struct socket *sock,
- const struct nfc_protocol *nfc_proto)
+ const struct nfc_protocol *nfc_proto, int kern)
{
struct sock *sk;
@@ -348,7 +349,7 @@ static int rawsock_create(struct net *net, struct socket *sock,
else
sock->ops = &rawsock_ops;
- sk = sk_alloc(net, PF_NFC, GFP_ATOMIC, nfc_proto->proto);
+ sk = sk_alloc(net, PF_NFC, GFP_ATOMIC, nfc_proto->proto, kern);
if (!sk)
return -ENOMEM;