aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btuart_cs.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-02-09 15:58:32 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-13 10:01:37 -0500
commit155961e8001719af6d87cbcc961111e8ce477843 (patch)
tree5b2485b5a7b2074f9e01111cf8539a34f34ce2d5 /drivers/bluetooth/btuart_cs.c
parentaa2b86d761a95068354511de755695ef6b53afc7 (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/btuart_cs.c')
-rw-r--r--drivers/bluetooth/btuart_cs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index 80ad2b9b352e..194224d07f7c 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -397,7 +397,7 @@ static void btuart_change_speed(btuart_info_t *info, unsigned int speed)
397 397
398static int btuart_hci_flush(struct hci_dev *hdev) 398static int btuart_hci_flush(struct hci_dev *hdev)
399{ 399{
400 btuart_info_t *info = (btuart_info_t *)(hdev->driver_data); 400 btuart_info_t *info = hci_get_drvdata(hdev);
401 401
402 /* Drop TX queue */ 402 /* Drop TX queue */
403 skb_queue_purge(&(info->txq)); 403 skb_queue_purge(&(info->txq));
@@ -435,7 +435,7 @@ static int btuart_hci_send_frame(struct sk_buff *skb)
435 return -ENODEV; 435 return -ENODEV;
436 } 436 }
437 437
438 info = (btuart_info_t *)(hdev->driver_data); 438 info = hci_get_drvdata(hdev);
439 439
440 switch (bt_cb(skb)->pkt_type) { 440 switch (bt_cb(skb)->pkt_type) {
441 case HCI_COMMAND_PKT: 441 case HCI_COMMAND_PKT:
@@ -493,7 +493,7 @@ static int btuart_open(btuart_info_t *info)
493 info->hdev = hdev; 493 info->hdev = hdev;
494 494
495 hdev->bus = HCI_PCCARD; 495 hdev->bus = HCI_PCCARD;
496 hdev->driver_data = info; 496 hci_set_drvdata(hdev, info);
497 SET_HCIDEV_DEV(hdev, &info->p_dev->dev); 497 SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
498 498
499 hdev->open = btuart_hci_open; 499 hdev->open = btuart_hci_open;