From 8f853903bdf49b4c111dcf13a0d5c81a84b7f2a6 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 7 Jan 2025 15:27:32 -0500 Subject: [PATCH] input: Switch back to kernel hidp if uhid cannot be initialized 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 8cf8e5ea7..3627573e7 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.3