From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v4 3/3] input/device: Don't destroy UHID device on disconnect
Date: Mon, 12 Feb 2024 17:31:46 -0500 [thread overview]
Message-ID: <20240212223146.4142264-3-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20240212223146.4142264-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes classic HID behave like HoG which keeps the UHID device
around while disconnected so it doesn't have to be recreated on every
reconnection.
---
profiles/input/device.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/profiles/input/device.c b/profiles/input/device.c
index ff7e3482d0eb..08bdb30f1f3e 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -985,6 +985,10 @@ static int uhid_disconnect(struct input_device *idev)
if (!idev->uhid_created)
return 0;
+ /* Only destroy the node if virtual cable unplug flag has been set */
+ if (idev->virtual_cable_unplug)
+ return 0;
+
bt_uhid_unregister_all(idev->uhid);
memset(&ev, 0, sizeof(ev));
--
2.43.0
next prev parent reply other threads:[~2024-02-12 22:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 22:31 [PATCH BlueZ v4 1/3] hog-lib: Don't destroy UHID device on detach Luiz Augusto von Dentz
2024-02-12 22:31 ` [PATCH BlueZ v4 2/3] input.conf: Make UserspaceHID defaults to true Luiz Augusto von Dentz
2024-02-12 22:31 ` Luiz Augusto von Dentz [this message]
2024-02-12 23:54 ` [BlueZ,v4,1/3] hog-lib: Don't destroy UHID device on detach bluez.test.bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240212223146.4142264-3-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).