summaryrefslogtreecommitdiff
path: root/net/bluetooth/af_bluetooth.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-03-06 21:08:51 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-03-06 20:15:21 +0100
commit6d785aa345f525e1fdf098b7c590168f0b00f3f1 (patch)
tree90aa79cca35cabed308ca3719bef5b516867b490 /net/bluetooth/af_bluetooth.c
parent801c1e8da57499a9922223ee1882b2b59debd47c (diff)
Bluetooth: Convert mgmt to use HCI chan registration API
This patch converts the existing mgmt code to use the newly introduced generic API for registering HCI channels with mgmt-like semantics. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/af_bluetooth.c')
-rw-r--r--net/bluetooth/af_bluetooth.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 20a4698e2255..70f9d945faf7 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -749,6 +749,13 @@ static int __init bt_init(void)
goto sock_err;
}
+ err = mgmt_init();
+ if (err < 0) {
+ sco_exit();
+ l2cap_exit();
+ goto sock_err;
+ }
+
return 0;
sock_err:
@@ -763,6 +770,8 @@ error:
static void __exit bt_exit(void)
{
+ mgmt_exit();
+
sco_exit();
l2cap_exit();