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>
This commit is contained in:
committed by
Johan Hedberg
parent
aa2b86d761
commit
155961e800
@ -254,7 +254,6 @@ struct hci_dev {
|
||||
|
||||
struct sk_buff_head driver_init;
|
||||
|
||||
void *driver_data;
|
||||
void *core_data;
|
||||
|
||||
atomic_t promisc;
|
||||
@ -625,6 +624,16 @@ static inline struct hci_dev *hci_dev_hold(struct hci_dev *d)
|
||||
|
||||
#define to_hci_dev(d) container_of(d, struct hci_dev, dev)
|
||||
|
||||
static inline void *hci_get_drvdata(struct hci_dev *hdev)
|
||||
{
|
||||
return dev_get_drvdata(&hdev->dev);
|
||||
}
|
||||
|
||||
static inline void hci_set_drvdata(struct hci_dev *hdev, void *data)
|
||||
{
|
||||
dev_set_drvdata(&hdev->dev, data);
|
||||
}
|
||||
|
||||
struct hci_dev *hci_dev_get(int index);
|
||||
struct hci_dev *hci_get_route(bdaddr_t *src, bdaddr_t *dst);
|
||||
|
||||
|
Reference in New Issue
Block a user