Revert "input/hog: Remove HID device after HoG device disconnects"
authorSonny Sasaka <sonnysasaka@chromium.org>
Mon, 14 Dec 2020 22:15:01 +0000 (14:15 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:34 +0000 (19:08 +0530)
commitba544ad4effaeb8dc6c4f1d06a80b1702389f4fe
tree4f8e7a4b9d3edb279523d1c3ebd2d7443e540904
parent75f9441d0c44e61aae049c560c7566573564e900
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.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/input/hog.c