public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] Bluetooth: btnxpuart: Fix compile errors due to BTNXPUART
@ 2025-03-07  8:09 Neeraj Sanjay Kale
  2025-03-07 10:33 ` [v1] " bluez.test.bot
  2025-03-07 15:02 ` [PATCH v1] " Luiz Augusto von Dentz
  0 siblings, 2 replies; 3+ messages in thread
From: Neeraj Sanjay Kale @ 2025-03-07  8:09 UTC (permalink / raw)
  To: marcel, luiz.dentz
  Cc: linux-bluetooth, linux-kernel, amitkumar.karwar,
	neeraj.sanjaykale

This fixes compilation errors seen due to merging recent patches.

hdev->cmd_timeout was recently renamed to hdev->reset in following
commit:
commit f07d478090b0 ("Bluetooth: Get rid of cmd_timeout and use the reset
callback")

Renamed nxp_cmd_timeout() to nxp_reset() accordingly.

In latest master, the check for "local-bd-address" device property seems
to be missing. Added the missing code in the patch.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503070951.EcxRrnHK-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202503071045.5Ac2pLEW-lkp@intel.com/
---
 drivers/bluetooth/btnxpuart.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index abe2ccd92604..b3454227c7c6 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -1318,8 +1318,8 @@ static int nxp_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
 	/* BD address can be assigned only after first reset command. */
 	err = __hci_cmd_sync_status(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
 	if (err) {
-		bt_dev_err(hdev, "Reset before setting local-bd-addr failed (%ld)",
-			   PTR_ERR(skb));
+		bt_dev_err(hdev, "Reset before setting local-bd-addr failed (%d)",
+			   err);
 		return err;
 	}
 
@@ -1422,7 +1422,7 @@ static bool nxp_wakeup(struct hci_dev *hdev)
 	return false;
 }
 
-static void nxp_cmd_timeout(struct hci_dev *hdev)
+static void nxp_reset(struct hci_dev *hdev)
 {
 	struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
 
@@ -1721,9 +1721,15 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
 	hdev->shutdown = nxp_shutdown;
 	hdev->wakeup = nxp_wakeup;
 	hdev->set_bdaddr = nxp_set_bdaddr;
-	hdev->cmd_timeout = nxp_cmd_timeout;
+	hdev->reset = nxp_reset;
 	SET_HCIDEV_DEV(hdev, &serdev->dev);
 
+	device_property_read_u8_array(&nxpdev->serdev->dev,
+				      "local-bd-address",
+				      (u8 *)&ba, sizeof(ba));
+	if (bacmp(&ba, BDADDR_ANY))
+		set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
+
 	if (hci_register_dev(hdev) < 0) {
 		dev_err(&serdev->dev, "Can't register HCI device\n");
 		goto probe_fail;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-07 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07  8:09 [PATCH v1] Bluetooth: btnxpuart: Fix compile errors due to BTNXPUART Neeraj Sanjay Kale
2025-03-07 10:33 ` [v1] " bluez.test.bot
2025-03-07 15:02 ` [PATCH v1] " Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox