diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2012-02-09 15:58:33 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-13 10:01:37 -0500 |
commit | 3dc07322b1ce3c8477690d54ebbf15a165f43066 (patch) | |
tree | c66786eff790fdb08747b3f92ee5014a5569d4e8 /include/net/bluetooth | |
parent | 155961e8001719af6d87cbcc961111e8ce477843 (diff) |
Bluetooth: Introduce to_hci_conn
This avoids using the dev_set/get_drvdata() functions to retrieve a
pointer to our own structure. We can use simple pointer arithmetic here.
The drvdata field is actually not needed by any other code-path but this
makes the code more consistent with hci_dev.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 4559189a22a..b20d990436b 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -623,6 +623,7 @@ static inline struct hci_dev *hci_dev_hold(struct hci_dev *d) | |||
623 | #define hci_dev_unlock(d) mutex_unlock(&d->lock) | 623 | #define hci_dev_unlock(d) mutex_unlock(&d->lock) |
624 | 624 | ||
625 | #define to_hci_dev(d) container_of(d, struct hci_dev, dev) | 625 | #define to_hci_dev(d) container_of(d, struct hci_dev, dev) |
626 | #define to_hci_conn(c) container_of(c, struct hci_conn, dev) | ||
626 | 627 | ||
627 | static inline void *hci_get_drvdata(struct hci_dev *hdev) | 628 | static inline void *hci_get_drvdata(struct hci_dev *hdev) |
628 | { | 629 | { |