Bluetooth: remove l2cap_load() hack
[pandora-kernel.git] / net / bluetooth / rfcomm / core.c
index ff8aaa7..c997393 100644 (file)
@@ -1164,7 +1164,8 @@ static int rfcomm_recv_ua(struct rfcomm_session *s, u8 dlci)
                         * initiator rfcomm_process_rx already calls
                         * rfcomm_session_put() */
                        if (s->sock->sk->sk_state != BT_CLOSED)
-                               rfcomm_session_put(s);
+                               if (list_empty(&s->dlcs))
+                                       rfcomm_session_put(s);
                        break;
                }
        }
@@ -2153,8 +2154,6 @@ static int __init rfcomm_init(void)
 {
        int err;
 
-       l2cap_load();
-
        hci_register_cb(&rfcomm_cb);
 
        rfcomm_thread = kthread_run(rfcomm_run, NULL, "krfcommd");