Bluetooth: btusb: mediatek: add callback function in btusb_disconnect
Add disconnect callback function in btusb_disconnect which is reserved for vendor specific usage before deregister hci in btusb_disconnect. Signed-off-by: Chris Lu <chris.lu@mediatek.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
committed by
Luiz Augusto von Dentz
parent
ad0c6f603b
commit
cea1805f16
@@ -846,6 +846,7 @@ struct btusb_data {
|
|||||||
|
|
||||||
int (*suspend)(struct hci_dev *hdev);
|
int (*suspend)(struct hci_dev *hdev);
|
||||||
int (*resume)(struct hci_dev *hdev);
|
int (*resume)(struct hci_dev *hdev);
|
||||||
|
int (*disconnect)(struct hci_dev *hdev);
|
||||||
|
|
||||||
int oob_wake_irq; /* irq for out-of-band wake-on-bt */
|
int oob_wake_irq; /* irq for out-of-band wake-on-bt */
|
||||||
unsigned cmd_timeout_cnt;
|
unsigned cmd_timeout_cnt;
|
||||||
@@ -4016,6 +4017,9 @@ static void btusb_disconnect(struct usb_interface *intf)
|
|||||||
if (data->diag)
|
if (data->diag)
|
||||||
usb_set_intfdata(data->diag, NULL);
|
usb_set_intfdata(data->diag, NULL);
|
||||||
|
|
||||||
|
if (data->disconnect)
|
||||||
|
data->disconnect(hdev);
|
||||||
|
|
||||||
hci_unregister_dev(hdev);
|
hci_unregister_dev(hdev);
|
||||||
|
|
||||||
if (intf == data->intf) {
|
if (intf == data->intf) {
|
||||||
|
|||||||
Reference in New Issue
Block a user