Skip to content

Commit

Permalink
Bluetooth: btusb: mediatek: move Bluetooth power off command position
Browse files Browse the repository at this point in the history
commit ad0c6f6 upstream.

Move MediaTek Bluetooth power off command before releasing
usb ISO interface.

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>
  • Loading branch information
Chris Lu authored and Greg Kroah-Hartman committed Jan 2, 2025
1 parent d508e56 commit b967b37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2734,11 +2734,14 @@ static int btusb_mtk_shutdown(struct hci_dev *hdev)
{
struct btusb_data *data = hci_get_drvdata(hdev);
struct btmtk_data *btmtk_data = hci_get_priv(hdev);
int ret;

ret = btmtk_usb_shutdown(hdev);

if (test_bit(BTMTK_ISOPKT_RUNNING, &btmtk_data->flags))
btusb_mtk_release_iso_intf(data);

return btmtk_usb_shutdown(hdev);
return ret;
}

#ifdef CONFIG_PM
Expand Down

0 comments on commit b967b37

Please sign in to comment.