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_ldisc.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_ldisc.c')
-rw-r--r-- | drivers/bluetooth/hci_ldisc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 459ff0ba5a42..01c23dfe2a10 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c | |||
@@ -174,7 +174,7 @@ static int hci_uart_open(struct hci_dev *hdev) | |||
174 | /* Reset device */ | 174 | /* Reset device */ |
175 | static int hci_uart_flush(struct hci_dev *hdev) | 175 | static int hci_uart_flush(struct hci_dev *hdev) |
176 | { | 176 | { |
177 | struct hci_uart *hu = (struct hci_uart *) hdev->driver_data; | 177 | struct hci_uart *hu = hci_get_drvdata(hdev); |
178 | struct tty_struct *tty = hu->tty; | 178 | struct tty_struct *tty = hu->tty; |
179 | 179 | ||
180 | BT_DBG("hdev %p tty %p", hdev, tty); | 180 | BT_DBG("hdev %p tty %p", hdev, tty); |
@@ -220,7 +220,7 @@ static int hci_uart_send_frame(struct sk_buff *skb) | |||
220 | if (!test_bit(HCI_RUNNING, &hdev->flags)) | 220 | if (!test_bit(HCI_RUNNING, &hdev->flags)) |
221 | return -EBUSY; | 221 | return -EBUSY; |
222 | 222 | ||
223 | hu = (struct hci_uart *) hdev->driver_data; | 223 | hu = hci_get_drvdata(hdev); |
224 | 224 | ||
225 | BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len); | 225 | BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len); |
226 | 226 | ||
@@ -384,7 +384,7 @@ static int hci_uart_register_dev(struct hci_uart *hu) | |||
384 | hu->hdev = hdev; | 384 | hu->hdev = hdev; |
385 | 385 | ||
386 | hdev->bus = HCI_UART; | 386 | hdev->bus = HCI_UART; |
387 | hdev->driver_data = hu; | 387 | hci_set_drvdata(hdev, hu); |
388 | 388 | ||
389 | hdev->open = hci_uart_open; | 389 | hdev->open = hci_uart_open; |
390 | hdev->close = hci_uart_close; | 390 | hdev->close = hci_uart_close; |