[PATCH 10/13] Bluetooth: btusb: Simplify btusb_shutdown_qca() by using __hci_reset_sync()
From: Zijun Hu
Date: Mon Jun 22 2026 - 10:55:03 EST
Use the new __hci_reset_sync() API instead of open-coding the HCI reset.
Signed-off-by: Zijun Hu <zijun.hu@xxxxxxxxxxxxxxxx>
---
drivers/bluetooth/btusb.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index e78277e24cd8..21e125db1b1f 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3900,16 +3900,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,
--
2.34.1