Bluetooth: btusb: mediatek: add callback function in btusb_disconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chris Lu <chris.lu@xxxxxxxxxxxx>

commit cea1805f165cdd783dd21f26df957118cb8641b4 upstream.

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@xxxxxxxxxxxx>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
Cc: Fedor Pchelkin <boddah8794@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/bluetooth/btusb.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -870,6 +870,7 @@ struct btusb_data {
 
 	int (*suspend)(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 */
 	unsigned cmd_timeout_cnt;
@@ -4043,6 +4044,9 @@ static void btusb_disconnect(struct usb_
 	if (data->diag)
 		usb_set_intfdata(data->diag, NULL);
 
+	if (data->disconnect)
+		data->disconnect(hdev);
+
 	hci_unregister_dev(hdev);
 
 	if (intf == data->intf) {


Patches currently in stable-queue which might be from chris.lu@xxxxxxxxxxxx are

queue-6.12/bluetooth-btusb-mediatek-add-intf-release-flow-when-usb-disconnect.patch
queue-6.12/bluetooth-btusb-mediatek-add-callback-function-in-btusb_disconnect.patch
queue-6.12/bluetooth-btusb-mediatek-move-bluetooth-power-off-command-position.patch
queue-6.12/bluetooth-btusb-mediatek-change-the-conditions-for-iso-interface.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux