input/hog-lib: avoid scanning characteristics too early
authorDmitry Torokhov <dtor@chromium.org>
Wed, 7 Apr 2021 22:34:18 +0000 (15:34 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
commit155158a2ed418f7d3d700cd5d6145443c37f9c7e
treeb2a46af861451a6fa55a6f42a937a8a24c3f16b0
parentf817f02069dadcadba978b3751656a1d47f2bcf5
input/hog-lib: avoid scanning characteristics too early

We need to have active connection to fully discover a HOG instance,
and in the chain

bt_hog_new()->
gatt_db_foreach_service()->
foreach_hog_service()->
hog_attach_instance()

we have not set up hog->attrib yet. So let's skip calling
foreach_hog_chrc() from hog_attach_instance(), especially since
we will be calling bt_hog_attach() pretty much immediately after
bt_hog_new(), and we will be discovering characteristics there anyway.

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