summaryrefslogtreecommitdiff
path: root/profiles/input
diff options
context:
space:
mode:
authorSonny Sasaka <sonnysasaka@chromium.org>2020-12-14 14:15:01 -0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-12-14 15:04:23 -0800
commit5fb9c9feb1b7d8845d10c386cfdcf17aa13cb27c (patch)
tree4878572ba18f1c96c5af347fea04f493ff806abe /profiles/input
parent98f5da02ce148a61efdfb2557152448f04bab51f (diff)
downloadbluez-5fb9c9feb1b7d8845d10c386cfdcf17aa13cb27c.tar.gz
Revert "input/hog: Remove HID device after HoG device disconnects"
This reverts commit d6cafa1f0c3ea1989f8a580e52f418b0998a3552. In commit d6cafa1f0c3e ("input/hog: Remove HID device after HoG device disconnects"), the bt_hog structure is destroyed in order to fix a bug where the UHID connection is not destroyed. This fix has the cost of increasing reconnection time because every reconnection would need to re-read the report map again. An improvement to this fix is, instead of removing the bt_hog structure, we can just destroy the UHID with UHID_DESTROY event and use the existing bt_hog structure to keep the cache of the report map to avoid re-reading the report map at reconnection.
Diffstat (limited to 'profiles/input')
-rw-r--r--profiles/input/hog.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index 91de4c70f..d50b82321 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -207,8 +207,6 @@ static int hog_disconnect(struct btd_service *service)
struct hog_device *dev = btd_service_get_user_data(service);
bt_hog_detach(dev->hog);
- bt_hog_unref(dev->hog);
- dev->hog = NULL;
btd_service_disconnecting_complete(service, 0);