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 /drivers/bluetooth/hci_vhci.c | |
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 'drivers/bluetooth/hci_vhci.c')
-rw-r--r-- | drivers/bluetooth/hci_vhci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 5f305c131a0d..158bfe507da7 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
@@ -61,7 +61,7 @@ static int vhci_open_dev(struct hci_dev *hdev) | |||
61 | 61 | ||
62 | static int vhci_close_dev(struct hci_dev *hdev) | 62 | static int vhci_close_dev(struct hci_dev *hdev) |
63 | { | 63 | { |
64 | struct vhci_data *data = hdev->driver_data; | 64 | struct vhci_data *data = hci_get_drvdata(hdev); |
65 | 65 | ||
66 | if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) | 66 | if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) |
67 | return 0; | 67 | return 0; |
@@ -73,7 +73,7 @@ static int vhci_close_dev(struct hci_dev *hdev) | |||
73 | 73 | ||
74 | static int vhci_flush(struct hci_dev *hdev) | 74 | static int vhci_flush(struct hci_dev *hdev) |
75 | { | 75 | { |
76 | struct vhci_data *data = hdev->driver_data; | 76 | struct vhci_data *data = hci_get_drvdata(hdev); |
77 | 77 | ||
78 | skb_queue_purge(&data->readq); | 78 | skb_queue_purge(&data->readq); |
79 | 79 | ||
@@ -93,7 +93,7 @@ static int vhci_send_frame(struct sk_buff *skb) | |||
93 | if (!test_bit(HCI_RUNNING, &hdev->flags)) | 93 | if (!test_bit(HCI_RUNNING, &hdev->flags)) |
94 | return -EBUSY; | 94 | return -EBUSY; |
95 | 95 | ||
96 | data = hdev->driver_data; | 96 | data = hci_get_drvdata(hdev); |
97 | 97 | ||
98 | memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1); | 98 | memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1); |
99 | skb_queue_tail(&data->readq, skb); | 99 | skb_queue_tail(&data->readq, skb); |
@@ -234,7 +234,7 @@ static int vhci_open(struct inode *inode, struct file *file) | |||
234 | data->hdev = hdev; | 234 | data->hdev = hdev; |
235 | 235 | ||
236 | hdev->bus = HCI_VIRTUAL; | 236 | hdev->bus = HCI_VIRTUAL; |
237 | hdev->driver_data = data; | 237 | hci_set_drvdata(hdev, data); |
238 | 238 | ||
239 | if (amp) | 239 | if (amp) |
240 | hdev->dev_type = HCI_AMP; | 240 | hdev->dev_type = HCI_AMP; |