Bluetooth: Remove __hci_dev_put/hold
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / bluetooth / btusb.c
index 55ac349695c48c147c5377030fe41254e9fd8ec8..d7664ffc5183f9f70569b9a01b99d61da78f2ea0 100644 (file)
@@ -726,9 +726,6 @@ static int btusb_send_frame(struct sk_buff *skb)
                usb_fill_bulk_urb(urb, data->udev, pipe,
                                skb->data, skb->len, btusb_tx_complete, skb);
 
-               if (skb->priority >= HCI_PRIO_MAX - 1)
-                       urb->transfer_flags  = URB_ISO_ASAP;
-
                hdev->stat.acl_tx++;
                break;
 
@@ -786,15 +783,6 @@ done:
        return err;
 }
 
-static void btusb_destruct(struct hci_dev *hdev)
-{
-       struct btusb_data *data = hdev->driver_data;
-
-       BT_DBG("%s", hdev->name);
-
-       kfree(data);
-}
-
 static void btusb_notify(struct hci_dev *hdev, unsigned int evt)
 {
        struct btusb_data *data = hdev->driver_data;
@@ -1007,11 +995,8 @@ static int btusb_probe(struct usb_interface *intf,
        hdev->close    = btusb_close;
        hdev->flush    = btusb_flush;
        hdev->send     = btusb_send_frame;
-       hdev->destruct = btusb_destruct;
        hdev->notify   = btusb_notify;
 
-       hdev->owner = THIS_MODULE;
-
        /* Interface numbers are hardcoded in the specification */
        data->isoc = usb_ifnum_to_if(data->udev, 1);
 
@@ -1094,7 +1079,7 @@ static void btusb_disconnect(struct usb_interface *intf)
 
        hdev = data->hdev;
 
-       __hci_dev_hold(hdev);
+       hci_dev_hold(hdev);
 
        usb_set_intfdata(data->intf, NULL);
 
@@ -1108,9 +1093,10 @@ static void btusb_disconnect(struct usb_interface *intf)
        else if (data->isoc)
                usb_driver_release_interface(&btusb_driver, data->isoc);
 
-       __hci_dev_put(hdev);
+       hci_dev_put(hdev);
 
        hci_free_dev(hdev);
+       kfree(data);
 }
 
 #ifdef CONFIG_PM