diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2012-02-09 15:58:32 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-13 10:01:37 -0500 |
commit | 155961e8001719af6d87cbcc961111e8ce477843 (patch) | |
tree | 5b2485b5a7b2074f9e01111cf8539a34f34ce2d5 /include/net/bluetooth/hci_core.h | |
parent | aa2b86d761a95068354511de755695ef6b53afc7 (diff) |
Bluetooth: Remove hci_dev->driver_data
The linux device model provides dev_set/get_drvdata so we can use this
to save private driver data.
This also removes several unnecessary casts.
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/hci_core.h')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 221d772ded55..4559189a22a1 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -254,7 +254,6 @@ struct hci_dev { | |||
254 | 254 | ||
255 | struct sk_buff_head driver_init; | 255 | struct sk_buff_head driver_init; |
256 | 256 | ||
257 | void *driver_data; | ||
258 | void *core_data; | 257 | void *core_data; |
259 | 258 | ||
260 | atomic_t promisc; | 259 | atomic_t promisc; |
@@ -625,6 +624,16 @@ static inline struct hci_dev *hci_dev_hold(struct hci_dev *d) | |||
625 | 624 | ||
626 | #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) |
627 | 626 | ||
627 | static inline void *hci_get_drvdata(struct hci_dev *hdev) | ||
628 | { | ||
629 | return dev_get_drvdata(&hdev->dev); | ||
630 | } | ||
631 | |||
632 | static inline void hci_set_drvdata(struct hci_dev *hdev, void *data) | ||
633 | { | ||
634 | dev_set_drvdata(&hdev->dev, data); | ||
635 | } | ||
636 | |||
628 | struct hci_dev *hci_dev_get(int index); | 637 | struct hci_dev *hci_dev_get(int index); |
629 | struct hci_dev *hci_get_route(bdaddr_t *src, bdaddr_t *dst); | 638 | struct hci_dev *hci_get_route(bdaddr_t *src, bdaddr_t *dst); |
630 | 639 | ||