Bluetooth: btusb: Simplify btusb_shutdown_qca() by using __hci_reset_sync()

btusb_shutdown_qca() open-codes a synchronous raw HCI reset that is
functionally equivalent to the newly added __hci_reset_sync().

Replace it with __hci_reset_sync() and return its result directly.

Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Zijun Hu 2026-06-25 22:19:53 -07:00 committed by Luiz Augusto von Dentz
parent 2c0a1aaede
commit 5b31fab938

View File

@ -3892,16 +3892,13 @@ static bool btusb_wakeup(struct hci_dev *hdev)
static int btusb_shutdown_qca(struct hci_dev *hdev)
{
struct sk_buff *skb;
int err;
skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
if (IS_ERR(skb)) {
err = __hci_reset_sync(hdev);
if (err)
bt_dev_err(hdev, "HCI reset during shutdown failed");
return PTR_ERR(skb);
}
kfree_skb(skb);
return 0;
return err;
}
static ssize_t force_poll_sync_read(struct file *file, char __user *user_buf,