Skip to content

Commit 9da1cfc

Browse files
ChrisCH-Lugregkh
authored andcommitted
Bluetooth: btusb: mediatek: add callback function in btusb_disconnect
commit cea1805 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@mediatek.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Cc: Fedor Pchelkin <boddah8794@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b967b37 commit 9da1cfc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/bluetooth/btusb.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,7 @@ struct btusb_data {
870870

871871
int (*suspend)(struct hci_dev *hdev);
872872
int (*resume)(struct hci_dev *hdev);
873+
int (*disconnect)(struct hci_dev *hdev);
873874

874875
int oob_wake_irq; /* irq for out-of-band wake-on-bt */
875876
unsigned cmd_timeout_cnt;
@@ -4043,6 +4044,9 @@ static void btusb_disconnect(struct usb_interface *intf)
40434044
if (data->diag)
40444045
usb_set_intfdata(data->diag, NULL);
40454046

4047+
if (data->disconnect)
4048+
data->disconnect(hdev);
4049+
40464050
hci_unregister_dev(hdev);
40474051

40484052
if (intf == data->intf) {

0 commit comments

Comments
 (0)