]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/bluetooth/af_bluetooth.c
Merge remote-tracking branch 'bluetooth/master'
[karo-tx-linux.git] / net / bluetooth / af_bluetooth.c
index 1f1a1118f4891b950ee8ba6b610ff9a8f4f0c36d..f6a1671ea2ff793bfca0efdd1541765803fb4d03 100644 (file)
@@ -25,6 +25,7 @@
 /* Bluetooth address family and sockets. */
 
 #include <linux/module.h>
+#include <linux/debugfs.h>
 #include <asm/ioctls.h>
 
 #include <net/bluetooth/bluetooth.h>
@@ -708,12 +709,17 @@ static struct net_proto_family bt_sock_family_ops = {
        .create = bt_sock_create,
 };
 
+struct dentry *bt_debugfs;
+EXPORT_SYMBOL_GPL(bt_debugfs);
+
 static int __init bt_init(void)
 {
        int err;
 
        BT_INFO("Core ver %s", VERSION);
 
+       bt_debugfs = debugfs_create_dir("bluetooth", NULL);
+
        err = bt_sysfs_init();
        if (err < 0)
                return err;
@@ -754,7 +760,6 @@ error:
 
 static void __exit bt_exit(void)
 {
-
        sco_exit();
 
        l2cap_exit();
@@ -764,6 +769,8 @@ static void __exit bt_exit(void)
        sock_unregister(PF_BLUETOOTH);
 
        bt_sysfs_cleanup();
+
+       debugfs_remove_recursive(bt_debugfs);
 }
 
 subsys_initcall(bt_init);