Thread (267 messages) 267 messages, 5 authors, 2012-09-27

Re: [PATCHv4 02/17] Bluetooth: A2MP: Create amp_mgr global list

From: Andrei Emeltchenko <hidden>
Date: 2012-09-14 06:40:58

Hi Mat,

On Thu, Sep 13, 2012 at 08:02:58AM -0700, Mat Martineau wrote:
...
quoted
@@ -550,6 +558,10 @@ static struct amp_mgr *amp_mgr_create(struct l2cap_conn *conn)
conn->hcon->amp_mgr = mgr;

+	mutex_lock(&amp_mgr_list_lock);
+	list_add(&mgr->list, &amp_mgr_list);
+	mutex_unlock(&amp_mgr_list_lock);
+
kref_init(&mgr->kref);
Should the reference count be initialized before adding to the list?
will change this.

Best regards 
Andrei Emeltchenko 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help