All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] input: Switch back to kernel hidp if uhid cannot be initialized
@ 2025-01-07 20:30 Luiz Augusto von Dentz
  2025-01-07 21:47 ` [BlueZ,v1] " bluez.test.bot
  2025-01-08 19:30 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2025-01-07 20:30 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If bt_uhid_new_default doesn't work it is likely that the underline
kernel doesn't support it so this attempts to switch back to kernel
mode (hidp).
---
 profiles/input/device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/profiles/input/device.c b/profiles/input/device.c
index 8cf8e5ea78e1..3627573e79c8 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -1527,9 +1527,9 @@ int input_device_register(struct btd_service *service)
 	if (uhid_state) {
 		idev->uhid = bt_uhid_new_default();
 		if (!idev->uhid) {
-			error("bt_uhid_new_default: failed");
-			input_device_free(idev);
-			return -EIO;
+			DBG("bt_uhid_new_default failed, switching to kernel "
+			    "mode");
+			uhid_state = UHID_DISABLED;
 		}
 	}
 
-- 
2.47.1


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

end of thread, other threads:[~2025-01-08 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-07 20:30 [PATCH BlueZ v1] input: Switch back to kernel hidp if uhid cannot be initialized Luiz Augusto von Dentz
2025-01-07 21:47 ` [BlueZ,v1] " bluez.test.bot
2025-01-08 19:30 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.