Bluetooth: Improve *_get() functions to return the object type
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 15 Aug 2014 18:06:57 +0000 (21:06 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 8 Sep 2014 17:07:52 +0000 (19:07 +0200)
commit51bb8457ddfa74ede52bf8c02054dea831d59fff
tree668dd96aa65093142ca79ce55cdca68067fcc129
parent5477610fc187d4aae0f699d21dfb0e3f440f7de7
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>
include/net/bluetooth/hci_core.h
include/net/bluetooth/l2cap.h
net/bluetooth/hidp/core.c
net/bluetooth/l2cap_core.c