aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/l2cap.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-08-15 21:06:57 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-09-08 19:07:52 +0200
commit51bb8457ddfa74ede52bf8c02054dea831d59fff (patch)
tree668dd96aa65093142ca79ce55cdca68067fcc129 /include/net/bluetooth/l2cap.h
parentBluetooth: Optimize connection parameter lookup for LE connections (diff)
downloadlinux-dev-51bb8457ddfa74ede52bf8c02054dea831d59fff.tar.xz
linux-dev-51bb8457ddfa74ede52bf8c02054dea831d59fff.zip
Bluetooth: Improve *_get() functions to return the object type
It's natural to have *_get() functions that increment the reference count of an object to return the object type itself. This way it's simple to make a copy of the object pointer and increase the reference count in a single step. This patch updates two such get() functions, namely hci_conn_get() and l2cap_conn_get(), and updates the users to take advantage of the new API. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth/l2cap.h')
-rw-r--r--include/net/bluetooth/l2cap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 1558eccb19db..8f1652ed3326 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -948,7 +948,7 @@ void l2cap_logical_cfm(struct l2cap_chan *chan, struct hci_chan *hchan,
void __l2cap_physical_cfm(struct l2cap_chan *chan, int result);
void l2cap_conn_shutdown(struct l2cap_conn *conn, int err);
-void l2cap_conn_get(struct l2cap_conn *conn);
+struct l2cap_conn *l2cap_conn_get(struct l2cap_conn *conn);
void l2cap_conn_put(struct l2cap_conn *conn);
int l2cap_register_user(struct l2cap_conn *conn, struct l2cap_user *user);