Message ID | 20240214185718.536748-3-luiz.dentz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ee880bee85864b0e691370197c9de8d2f7ba0af2 |
Headers | show |
Series | [BlueZ,v5,1/3] hog-lib: Don't destroy UHID device on detach | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
tedd_an/CheckPatch | success | CheckPatch PASS |
tedd_an/GitLint | success | Gitlint PASS |
tedd_an/IncrementalBuild | success | Incremental Build PASS |
diff --git a/profiles/input/device.c b/profiles/input/device.c index ff7e3482d0eb..0d32b705bd00 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));
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(+)