[PATCH v2 08/12] Bluetooth: btusb: Simplify btusb_shutdown_qca() by using __hci_reset_sync()

From: Zijun Hu

Date: Fri Jun 26 2026 - 01:24:26 EST


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@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 a5ff4af90675..25bbee8f5d93 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