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/btwilink.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/btwilink.c')
-rw-r--r-- | drivers/bluetooth/btwilink.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/bluetooth/btwilink.c b/drivers/bluetooth/btwilink.c index b81b32e4fa12..88694697f34f 100644 --- a/drivers/bluetooth/btwilink.c +++ b/drivers/bluetooth/btwilink.c | |||
@@ -161,7 +161,7 @@ static int ti_st_open(struct hci_dev *hdev) | |||
161 | return -EBUSY; | 161 | return -EBUSY; |
162 | 162 | ||
163 | /* provide contexts for callbacks from ST */ | 163 | /* provide contexts for callbacks from ST */ |
164 | hst = hdev->driver_data; | 164 | hst = hci_get_drvdata(hdev); |
165 | 165 | ||
166 | for (i = 0; i < MAX_BT_CHNL_IDS; i++) { | 166 | for (i = 0; i < MAX_BT_CHNL_IDS; i++) { |
167 | ti_st_proto[i].priv_data = hst; | 167 | ti_st_proto[i].priv_data = hst; |
@@ -236,7 +236,7 @@ done: | |||
236 | static int ti_st_close(struct hci_dev *hdev) | 236 | static int ti_st_close(struct hci_dev *hdev) |
237 | { | 237 | { |
238 | int err, i; | 238 | int err, i; |
239 | struct ti_st *hst = hdev->driver_data; | 239 | struct ti_st *hst = hci_get_drvdata(hdev); |
240 | 240 | ||
241 | if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) | 241 | if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) |
242 | return 0; | 242 | return 0; |
@@ -264,7 +264,7 @@ static int ti_st_send_frame(struct sk_buff *skb) | |||
264 | if (!test_bit(HCI_RUNNING, &hdev->flags)) | 264 | if (!test_bit(HCI_RUNNING, &hdev->flags)) |
265 | return -EBUSY; | 265 | return -EBUSY; |
266 | 266 | ||
267 | hst = hdev->driver_data; | 267 | hst = hci_get_drvdata(hdev); |
268 | 268 | ||
269 | /* Prepend skb with frame type */ | 269 | /* Prepend skb with frame type */ |
270 | memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1); | 270 | memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1); |
@@ -312,7 +312,7 @@ static int bt_ti_probe(struct platform_device *pdev) | |||
312 | 312 | ||
313 | hst->hdev = hdev; | 313 | hst->hdev = hdev; |
314 | hdev->bus = HCI_UART; | 314 | hdev->bus = HCI_UART; |
315 | hdev->driver_data = hst; | 315 | hci_set_drvdata(hdev, hst); |
316 | hdev->open = ti_st_open; | 316 | hdev->open = ti_st_open; |
317 | hdev->close = ti_st_close; | 317 | hdev->close = ti_st_close; |
318 | hdev->flush = NULL; | 318 | hdev->flush = NULL; |