summaryrefslogtreecommitdiff
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorZijun Hu <zijun.hu@oss.qualcomm.com>2026-08-01 23:31:40 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-08-07 15:40:26 -0400
commit73c4c035ae25108ad98ff03ccdd0c763a42bb08f (patch)
tree481f1518f9030dde1d3b02eee004918951081c2f /drivers/bluetooth
parente6997c120c62381700f8fdf0c3bdc46d2d6fe698 (diff)
downloadlinux-next-73c4c035ae25108ad98ff03ccdd0c763a42bb08f.tar.gz
linux-next-73c4c035ae25108ad98ff03ccdd0c763a42bb08f.zip
Bluetooth: btnxpuart: Simplify nxp_set_ind_reset() by __hci_reset_dev()
nxp_set_ind_reset() injects the non-zero hardware error code BTNXPUART_IR_HW_ERR. Simplify it by __hci_reset_dev(hdev, BTNXPUART_IR_HW_ERR). Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btnxpuart.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 0bb300eef157..993c48b5f593 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -1331,19 +1331,7 @@ static int nxp_check_boot_sign(struct btnxpuart_dev *nxpdev)
static int nxp_set_ind_reset(struct hci_dev *hdev, void *data)
{
- static const u8 ir_hw_err[] = { HCI_EV_HARDWARE_ERROR,
- 0x01, BTNXPUART_IR_HW_ERR };
- struct sk_buff *skb;
-
- skb = bt_skb_alloc(3, GFP_ATOMIC);
- if (!skb)
- return -ENOMEM;
-
- hci_skb_pkt_type(skb) = HCI_EVENT_PKT;
- skb_put_data(skb, ir_hw_err, 3);
-
- /* Inject Hardware Error to upper stack */
- return hci_recv_frame(hdev, skb);
+ return __hci_reset_dev(hdev, BTNXPUART_IR_HW_ERR);
}
/* Firmware dump */