diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-09-27 17:26:12 +0300 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-09-27 17:12:46 -0300 |
commit | 52c0d6e56b634b195e377192182391d526cdd5e4 (patch) | |
tree | 24a32bc650f821d9aeadf90c7891285f50778774 /net/bluetooth/a2mp.c | |
parent | 3161ae1c72f03b021bc67504c13025626c26d30c (diff) | |
download | linux-52c0d6e56b634b195e377192182391d526cdd5e4.tar.bz2 |
Bluetooth: AMP: Remote AMP ctrl definitions
Create remote AMP controllers structure. It is used to keep information
about discovered remote AMP controllers by A2MP protocol.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/a2mp.c')
-rw-r--r-- | net/bluetooth/a2mp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index f04c44146663..35e188c7a441 100644 --- a/net/bluetooth/a2mp.c +++ b/net/bluetooth/a2mp.c @@ -594,6 +594,7 @@ static void amp_mgr_destroy(struct kref *kref) list_del(&mgr->list); mutex_unlock(&_mgr_list_lock); + amp_ctrl_list_flush(mgr); kfree(mgr); } @@ -630,6 +631,10 @@ static struct amp_mgr *amp_mgr_create(struct l2cap_conn *conn) kref_init(&mgr->kref); + /* Remote AMP ctrl list initialization */ + INIT_LIST_HEAD(&mgr->amp_ctrls); + mutex_init(&mgr->amp_ctrls_lock); + mutex_lock(&_mgr_list_lock); list_add(&mgr->list, &_mgr_list); mutex_unlock(&_mgr_list_lock); |