From: David Herrmann Date: Sat, 6 Apr 2013 18:28:44 +0000 (+0200) Subject: Bluetooth: l2cap: introduce l2cap_conn ref-counting X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~65^2~43^2^2~62^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c903e373c11f62d62bce1209f662ca92589a075;p=pandora-kernel.git Bluetooth: l2cap: introduce l2cap_conn ref-counting If we want to use l2cap_conn outside of l2cap_core.c, we need refcounting for these objects. Otherwise, we cannot synchronize l2cap locks with outside locks and end up with deadlocks. Hence, introduce ref-counting for l2cap_conn objects. This doesn't affect l2cap internals at all, as they use a direct synchronization. We also keep a reference to the parent hci_conn for locking purposes as l2cap_conn depends on this. This doesn't affect the connection itself but only the lifetime of the (dead) object. Signed-off-by: David Herrmann Acked-by: Marcel Holtmann Signed-off-by: Gustavo Padovan --- Reading git-diff-tree failed