]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bluetooth/cmtp/sock.c
Merge branch 'master' of ../mmc
[linux-2.6-omap-h63xx.git] / net / bluetooth / cmtp / sock.c
index 19be7861e51ead07db64e1fafb06956cc425e0d1..16b0fad74f6e82d6a9ec0f5c98725a50fd89757a 100644 (file)
 
 #include "cmtp.h"
 
-#ifndef CONFIG_BT_CMTP_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 static int cmtp_sock_release(struct socket *sock)
 {
        struct sock *sk = sock->sk;
@@ -88,7 +83,7 @@ static int cmtp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
                        return err;
 
                if (nsock->sk->sk_state != BT_CONNECTED) {
-                       fput(nsock->file);
+                       sockfd_put(nsock);
                        return -EBADFD;
                }
 
@@ -97,7 +92,7 @@ static int cmtp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
                        if (copy_to_user(argp, &ca, sizeof(ca)))
                                err = -EFAULT;
                } else
-                       fput(nsock->file);
+                       sockfd_put(nsock);
 
                return err;
 
@@ -195,7 +190,7 @@ static struct proto cmtp_proto = {
        .obj_size       = sizeof(struct bt_sock)
 };
 
-static int cmtp_sock_create(struct socket *sock, int protocol)
+static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol)
 {
        struct sock *sk;
 
@@ -204,7 +199,7 @@ static int cmtp_sock_create(struct socket *sock, int protocol)
        if (sock->type != SOCK_RAW)
                return -ESOCKTNOSUPPORT;
 
-       sk = sk_alloc(PF_BLUETOOTH, GFP_ATOMIC, &cmtp_proto, 1);
+       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &cmtp_proto);
        if (!sk)
                return -ENOMEM;