diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-03-26 17:18:44 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-03-26 17:19:03 +0200 |
commit | 7fd52392c56361a40f0c630a82b36b95ca31eac6 (patch) | |
tree | 14091de24c6b28ea4cae9826f98aeedb7be091f5 /drivers/bluetooth/bpa10x.c | |
parent | perf: Move mmap page data_head offset assertion out of header (diff) | |
parent | Merge tag 'stable/for-linus-3.4-tag-two' of git://git.kernel.org/pub/scm/linu... (diff) | |
download | linux-7fd52392c56361a40f0c630a82b36b95ca31eac6.tar.xz linux-7fd52392c56361a40f0c630a82b36b95ca31eac6.zip |
Merge branch 'linus' into perf/urgent
Merge reason: we need to fix a non-trivial merge conflict.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/bluetooth/bpa10x.c')
-rw-r--r-- | drivers/bluetooth/bpa10x.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c index 62831603de5e..d894340a7601 100644 --- a/drivers/bluetooth/bpa10x.c +++ b/drivers/bluetooth/bpa10x.c @@ -66,7 +66,7 @@ struct hci_vendor_hdr { static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count) { - struct bpa10x_data *data = hdev->driver_data; + struct bpa10x_data *data = hci_get_drvdata(hdev); BT_DBG("%s queue %d buffer %p count %d", hdev->name, queue, buf, count); @@ -189,7 +189,7 @@ done: static void bpa10x_rx_complete(struct urb *urb) { struct hci_dev *hdev = urb->context; - struct bpa10x_data *data = hdev->driver_data; + struct bpa10x_data *data = hci_get_drvdata(hdev); int err; BT_DBG("%s urb %p status %d count %d", hdev->name, @@ -219,7 +219,7 @@ static void bpa10x_rx_complete(struct urb *urb) static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev) { - struct bpa10x_data *data = hdev->driver_data; + struct bpa10x_data *data = hci_get_drvdata(hdev); struct urb *urb; unsigned char *buf; unsigned int pipe; @@ -260,7 +260,7 @@ static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev) static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev) { - struct bpa10x_data *data = hdev->driver_data; + struct bpa10x_data *data = hci_get_drvdata(hdev); struct urb *urb; unsigned char *buf; unsigned int pipe; @@ -301,7 +301,7 @@ static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev) static int bpa10x_open(struct hci_dev *hdev) { - struct bpa10x_data *data = hdev->driver_data; + struct bpa10x_data *data = hci_get_drvdata(hdev); int err; BT_DBG("%s", hdev->name); @@ -329,7 +329,7 @@ error: static int bpa10x_close(struct hci_dev *hdev) { - struct bpa10x_data *data = hdev->driver_data; + struct bpa10x_data *data = hci_get_drvdata(hdev); BT_DBG("%s", hdev->name); @@ -343,7 +343,7 @@ static int bpa10x_close(struct hci_dev *hdev) static int bpa10x_flush(struct hci_dev *hdev) { - struct bpa10x_data *data = hdev->driver_data; + struct bpa10x_data *data = hci_get_drvdata(hdev); BT_DBG("%s", hdev->name); @@ -355,7 +355,7 @@ static int bpa10x_flush(struct hci_dev *hdev) static int bpa10x_send_frame(struct sk_buff *skb) { struct hci_dev *hdev = (struct hci_dev *) skb->dev; - struct bpa10x_data *data = hdev->driver_data; + struct bpa10x_data *data = hci_get_drvdata(hdev); struct usb_ctrlrequest *dr; struct urb *urb; unsigned int pipe; @@ -432,17 +432,6 @@ static int bpa10x_send_frame(struct sk_buff *skb) return 0; } -static void bpa10x_destruct(struct hci_dev *hdev) -{ - struct bpa10x_data *data = hdev->driver_data; - - BT_DBG("%s", hdev->name); - - kfree_skb(data->rx_skb[0]); - kfree_skb(data->rx_skb[1]); - kfree(data); -} - static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct bpa10x_data *data; @@ -470,7 +459,7 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id * } hdev->bus = HCI_USB; - hdev->driver_data = data; + hci_set_drvdata(hdev, data); data->hdev = hdev; @@ -480,9 +469,6 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id * hdev->close = bpa10x_close; hdev->flush = bpa10x_flush; hdev->send = bpa10x_send_frame; - hdev->destruct = bpa10x_destruct; - - hdev->owner = THIS_MODULE; set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks); @@ -512,6 +498,9 @@ static void bpa10x_disconnect(struct usb_interface *intf) hci_unregister_dev(data->hdev); hci_free_dev(data->hdev); + kfree_skb(data->rx_skb[0]); + kfree_skb(data->rx_skb[1]); + kfree(data); } static struct usb_driver bpa10x_driver = { |